Skip to content

The destroy is function private and does not seem to be used #49

@bseddon

Description

@bseddon

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);

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions