Skip to content

Instantly share code, notes, and snippets.

@zukilover
Created June 8, 2016 04:12
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save zukilover/a7d828b727286f6825bee709862941c8 to your computer and use it in GitHub Desktop.
Save zukilover/a7d828b727286f6825bee709862941c8 to your computer and use it in GitHub Desktop.
Initiate chosen.js library call
$(s.inputSelect)
.each(function() {
if ( !$().chosen ) return;
var noSearch = typeof $(this).data('no-search') !== 'undefined' ? $(this).data('no-search') : "true";
$(this)
.each(function() {
var e = $(this).attr('data-nosearch', noSearch),
t = e.attr("data-nosearch") === "true" ? !0 : !1,
n = {};
n.width = '100%';
t && (n.disable_search_threshold = 9999999);
var theChosen = e.chosen(n);
});
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment