Sha256: a1eec986edacf86e4a0083adc4f866ea48b872926ce284cd9a1be9bc7d8625bc
Contents?: true
Size: 1.05 KB
Versions: 8
Compression:
Stored size: 1.05 KB
Contents
// 'Polyfill' for :placeholder-shown, since it's not standard yet $(document).on('focus focusout', '*:not(.zuo-datepicker) > .zuo-textbox', function(e) { $("label[for='" + $(this).attr('id') + "']").toggleClass('floating', $(this).val() !== ""); }); $(document).on('change.select2', 'select', function(e) { $("label[for='" + $(this).attr('id') + "']").toggleClass('floating', !['', null].includes($(this).val())); }); $(document).on('change change.select2', '.zuo-form-group.has-error > input, .zuo-form-group.has-error > select', function(e) { $(this).parent('.zuo-form-group').removeClass('has-error'); }); $(document).on('show', '.zuo-datepicker', function(e) { $(this).children('.zuo-floating-label').addClass('floating'); }); $(document).on('hide', '.zuo-datepicker', function(e) { $(this).children('.zuo-floating-label').toggleClass('floating', !!e.date); }); $.fn.select2.defaults.set("theme", "bootstrap"); $.fn.select2.defaults.set("dropdownAutoWidth", true); $.fn.select2.defaults.set("width", "100%"); $.fn.select2.defaults.set("placeholder", "");
Version data entries
8 entries across 8 versions & 1 rubygems