|
40 | 40 | // https://gist.github.com/atesgoral/984375
|
41 | 41 | format = function(f){var a=arguments;return(""+f).replace(/{(\d+|(\w+))}/g,function(s,i,p){return p&&a[1]?a[1][p]:a[i]})},
|
42 | 42 | init = function(element, options) {
|
43 |
| - var options = $.extend(true, { |
| 43 | + options = $.extend(true, { |
44 | 44 | onOpen: $.noop,
|
45 | 45 | onClose: $.noop,
|
46 | 46 | onChange: $.noop,
|
|
56 | 56 | postfixes: 'Input Items Open Disabled TempShow HideSelect Wrapper Hover Responsive',
|
57 | 57 | camelCase: true
|
58 | 58 | },
|
59 |
| - optionsItemBuilder: '{text}', // function(itemData, element, index) |
60 |
| - }, options), |
| 59 | + optionsItemBuilder: '{text}' // function(itemData, element, index) |
| 60 | + }, options); |
| 61 | + var |
61 | 62 | customClass = options.customClass,
|
62 | 63 | postfixes = customClass.postfixes.split(' '),
|
63 | 64 | arrClasses = [],
|
|
66 | 67 | if (options.disableOnMobile && /android|ip(hone|od|ad)/i.test(navigator.userAgent)) return;
|
67 | 68 |
|
68 | 69 | // generate classNames for elements
|
69 |
| - while (currPostfix = postfixes.shift()){ |
| 70 | + while ((currPostfix = postfixes.shift())){ |
70 | 71 | var c = customClass.prefix + currPostfix;
|
71 | 72 | arrClasses.push(customClass.camelCase ? c : c.replace(/([A-Z])/g, "-$&").toLowerCase());
|
72 | 73 | }
|
|
100 | 101 | $original.wrap('<div class="' + arrClasses[5] + '">');
|
101 | 102 |
|
102 | 103 | function _populate() {
|
103 |
| - var $options = $original.children(); |
| 104 | + var $options = $original.children(), |
104 | 105 | _$li = '<ul>',
|
105 | 106 | selectedIndex = $options.filter(':' + selectStr).index();
|
106 | 107 |
|
|
0 commit comments