Created
February 27, 2018 09:07
-
-
Save Tusko/4168750ebbdf34fd2601b646932be008 to your computer and use it in GitHub Desktop.
woocommerce + selectrict.js
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| $(document).ajaxComplete(function(){ | |
| $('.selectric-wrapper').each(function () { | |
| var t = $(this), | |
| s = $('select', t), | |
| Selectric = s.data('selectric'); | |
| if($('input.input-text', t).length > 0) { | |
| $('input.input-text', t).clone().appendTo('#billing_state_field'); | |
| t.remove(); | |
| } | |
| if(typeof Selectric !== 'undefined') { | |
| Selectric.refresh(); | |
| } | |
| }); | |
| $('select').each(function(){ | |
| var e = $(this); | |
| if(e.data('selectric') !== 'undefined') { | |
| e.selectric({ | |
| arrowButtonMarkup: '<i class="arrow_carrot-down"></i>', | |
| maxHeight: (mob()?200:350), | |
| disableOnMobile: false, | |
| nativeOnMobile: false | |
| }); | |
| } | |
| }); | |
| }); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment