Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature request: destroy method #1127

Closed
lunatique opened this issue Apr 8, 2013 · 3 comments
Closed

Feature request: destroy method #1127

lunatique opened this issue Apr 8, 2013 · 3 comments

Comments

@lunatique
Copy link

Hi,

Just like we have $('.item').chosen(); for creating a new instance, it would be useful to have $('.item').chosen_remove(); for destroying a particular instance.
That would give me a bit more control over it.

Think of dynamic UIs where the user has the ability to manipulate the list via AJAX. (e.g. Category List with a "Create new category" inline form).

Great plugin. Keep up the good work.
Cheers!

@vincent-richard
Copy link

Hi!

I found this workaround on the net:

$(".item").removeAttr("style", "").removeClass("chzn-done").data("chosen", null).next().remove();

@lunatique
Copy link
Author

Thanks. This works better than mine.

@pfiller
Copy link
Contributor

pfiller commented Apr 16, 2013

Thanks for sharing that @vincent-richard.

Closing as this is a duplicate of #133

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants