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

Dynamically updating optgroups leaves old optgroup headers #80

Open
mutatron opened this issue Jan 20, 2014 · 0 comments
Open

Dynamically updating optgroups leaves old optgroup headers #80

mutatron opened this issue Jan 20, 2014 · 0 comments
Labels

Comments

@mutatron
Copy link

This is changed from a previous problem, which I resolved in my own code.

Still, there's this problem of having optgroup headers leftover after changes to the optgroup.

I'm replacing the optgroup using:

jQuery('optgroup#Facebook).replaceWith(json.message.html);
jQuery('#multiselect_simple').multiselect('refresh');

This works, but it leaves the previous optgroup header sitting there. In my app, if you authorize the app to Facebook, you get whatever pages the user has. So you'd start with an optgroup with a single option, which itself contains a button to authorize to Facebook. Then when you authorize, you get options corresponding to the Facebook pages made available by the user. Then you'd have the main Facebook option, plus another option for each page.

That part works excellently, but the header for the former optgroup is left on display after the replacement.

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

No branches or pull requests

2 participants