Current File : /pages/54/47/d0016649/home/htdocs/ipc1/wp-content/themes/lhst/cloudfw/js/fileinput.min.js |
/*!
* Envision
*
* @version 3.2.0
*
* @author Wptation
* @link http://envision.wptation.com/
* @license ThemeForest Split Licence
* @copyright 2019
*/
!function(i){i.fn.customFileInput=function(){return i(this).each(function(){var s=i(this);if(s.hasClass("customfile-input"))return!0;s.addClass("customfile-input").mouseover(function(){a.addClass("customfile-hover").find(".customfile-button").removeClass("small-green").addClass("small-dark")}).mouseout(function(){a.removeClass("customfile-hover").find(".customfile-button").removeClass("small-dark").addClass("small-green")}).focus(function(){a.addClass("customfile-focus"),s.data("val",s.val()),setTimeout(function(){s.trigger("checkChange"),a.scrollTo(0)},100)}).blur(function(){a.removeClass("customfile-focus"),i(this).trigger("checkChange")}).bind("disable",function(){s.attr("disabled",!0),a.addClass("customfile-disabled")}).bind("enable",function(){s.removeAttr("disabled"),a.removeClass("customfile-disabled")}).bind("checkChange",function(){s.val()&&s.val()!=s.data("val")&&s.trigger("change")}).bind("change",function(){var e=i(this).val().split(/\\/).pop();l.text(e).addClass("customfile-feedback-populated"),a.addClass("customfile-focus"),t.children("span").text("Change")}).click(function(){s.data("val",s.val()),setTimeout(function(){s.trigger("checkChange")},100)});var a=i('<div class="customfile"></div>'),t=i('<span class="small-button small-green customfile-button" aria-hidden="true"><span>Browse</span></span>').appendTo(a),l=i('<span class="customfile-feedback" aria-hidden="true">No file selected</span>').appendTo(a);s.is("[disabled]")&&s.trigger("disable"),a.mousemove(function(e){a.scrollTo(0),s.css({left:e.pageX-a.offset().left-s.outerWidth()+25,top:e.pageY-a.offset().top-15})}).insertAfter(s),s.appendTo(a)})}}(jQuery);