diff options
Diffstat (limited to 'uikit/static/js/components/form-select.min.js')
-rw-r--r-- | uikit/static/js/components/form-select.min.js | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/uikit/static/js/components/form-select.min.js b/uikit/static/js/components/form-select.min.js new file mode 100644 index 0000000..fc09bfb --- /dev/null +++ b/uikit/static/js/components/form-select.min.js @@ -0,0 +1,2 @@ +/*! UIkit 2.21.0 | http://www.getuikit.com | (c) 2014 YOOtheme | MIT License */ +!function(t){var e;window.UIkit&&(e=t(UIkit)),"function"==typeof define&&define.amd&&define("uikit-form-select",["uikit"],function(){return e||t(UIkit)})}(function(t){"use strict";return t.component("formSelect",{defaults:{target:">span:first",activeClass:"uk-active"},boot:function(){t.ready(function(e){t.$("[data-uk-form-select]",e).each(function(){var e=t.$(this);if(!e.data("formSelect")){t.formSelect(e,t.Utils.options(e.attr("data-uk-form-select")))}})})},init:function(){var t=this;this.target=this.find(this.options.target),this.select=this.find("select"),this.select.on("change",function(){var e=t.select[0],i=function(){try{t.target.text(e.options[e.selectedIndex].text)}catch(n){}return t.element[t.select.val()?"addClass":"removeClass"](t.options.activeClass),i};return i()}()),this.element.data("formSelect",this)}}),t.formSelect});
\ No newline at end of file |