JSFiddle - React, Tailwind, and code Playground
JavaScript
/*!
* jQuery.filer
* Copyright (c) 2015 CreativeDream
* Website: http://creativedream.net/plugins/jquery.filer
* Version: 1.0.2 (28-07-2015)
* Requires: jQuery v1.7.1 or later
*/
(function($) {
"use strict";
$.fn.filer = function(q) {
return this.each(function(t, r) {
var s = $(r),
b = '.jFiler',
p = $(),
o = $(),
l = $(),
sl = [],
n = $.extend(true, {}, $.fn.filer.defaults, q),
f = {
init: function() {
s.wrap('<div class="jFiler"></div>');
p = s.closest(b);
f._changeInput();
},
_bindInput: function() {
if (n.changeInput && o.size() > 0) {
o.bind("click", f._clickHandler);
}
s.on({
"focus": function() {
o.addClass('focused');
},
"blur": function() {
o.removeClass('focused');
},
"change": function() {
f._onChange();
}
});
if (n.dragDrop) {
(o.length > 0 ? o : s).bind("drop", f._dragDrop.drop).bind("dragover", f._dragDrop.dragEnter).bind("dragleave", f._dragDrop.dragLeave);
}
if (n.uploadFile && n.clipBoardPaste) {
$(window).on("paste", f._clipboardPaste);
}
},
_unbindInput: function() {
if (n.changeInput && o.size() > 0) {
o.unbind("click", f._clickHandler);
...