websemantics / Image-Select

Image Select is an extension of Chosen, a jQuery plugin that makes long, unwieldy select boxes much more user-friendly. It provides image support for Single and Multi select HTML tags.
http://websemantics.github.io/Image-Select
MIT License
148 stars 44 forks source link

chosen("destroy") doesn't work #41

Closed hamyo closed 7 years ago

hamyo commented 7 years ago

chosen("destroy") throw the error "TypeError: chosen is undefined".

jQuery.Deferred exception: chosen is undefined getSelectedOptions@http://localhost:8080/test/scripts/image-select/ImageSelect.jquery.js:82:13 chosen/</<@http://localhost:8080/test/scripts/image-select/ImageSelect.jquery.js:123:41

hamyo commented 7 years ago

Probably after calling of chosen's method var ret = fn_chosen.apply(this, arguments) need check if (params === 'destroy') { return }

websemantics commented 7 years ago

Just pushed few changes which should fix this. Will close but please re-open if not. Thanks