X-Git-Url: https://git.mdrn.pl/redakcja.git/blobdiff_plain/3263fb5558f69c727e61a6d4c0b3575a0f081ef6..b2d61af6200bf8281e5466a183eae491440f4c1a:/redakcja/static/js/catalogue/catalogue.js diff --git a/redakcja/static/js/catalogue/catalogue.js b/redakcja/static/js/catalogue/catalogue.js index a750b77b..04fedce7 100755 --- a/redakcja/static/js/catalogue/catalogue.js +++ b/redakcja/static/js/catalogue/catalogue.js @@ -51,16 +51,17 @@ } }); - $('.chosen-select').chosen().each(function() { - var widget = $(this.nextSibling), $t = $(this); - $.each($.merge([], this.attributes), function() { - if (this.name.substr(0, 5) === 'data-') { - $t.removeAttr(this.name); - widget.attr(this.name, this.value); - } + if ($.isFunction($.fn.chosen)) { + $('.chosen-select').chosen().each(function () { + var widget = $(this.nextSibling), $t = $(this); + $.each($.merge([], this.attributes), function () { + if (this.name.substr(0, 5) === 'data-') { + $t.removeAttr(this.name); + widget.attr(this.name, this.value); + } + }); }); - }); - + } // tutorial mode