Fastselect is lightweight browser plugin for enhanced select elements based on jQuery. Enables fast and sensible UI upgrade of select element with features like option searching and remote dataset loading.
When used inside a JQuery dialog it can be important to tidy up when the dialog is closed. Fastselect does implement a 'destroy' function but, perhaps because it is not implemented as a widget, this function is not called so the plugin does not tidy up the extra HTML it adds to the page.
It will be great if the destroy function can be exposed.
In the meantime, here is a hack to invoke the function and tidy up:
var elements = jQuery('');
elements.each(function() { jQuery.data(this, 'fastselect').destroy(); });
elements.prop('selectedIndex', -1);
When used inside a JQuery dialog it can be important to tidy up when the dialog is closed. Fastselect does implement a 'destroy' function but, perhaps because it is not implemented as a widget, this function is not called so the plugin does not tidy up the extra HTML it adds to the page.
It will be great if the destroy function can be exposed.
In the meantime, here is a hack to invoke the function and tidy up:
var elements = jQuery('');
elements.each(function() { jQuery.data(this, 'fastselect').destroy(); });
elements.prop('selectedIndex', -1);