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

Is it possible to remove all options? #193

Closed
bobg2015 opened this issue Jul 6, 2015 · 4 comments
Closed

Is it possible to remove all options? #193

bobg2015 opened this issue Jul 6, 2015 · 4 comments

Comments

@bobg2015
Copy link

bobg2015 commented Jul 6, 2015

Hi,

Is it possible to remove all options? I see there is a 'removeOption' option but it would be handly to be able to do a remove_all.

cheers.

@ezk84
Copy link

ezk84 commented Jul 30, 2015

I'd be interested in this as well!

@bobg2015 Found a solution:

$('#my-multi').empty().multiSelect('refresh');

Basically, you empty the select and then force the plugin to refresh itself based on the new state of the select.

@brmendez
Copy link

brmendez commented May 10, 2018

I am actually unaware of a removeOption with multiSelect. I have searched the http://loudev.com/ multiSelect library and the jquery-multi-select.js and have had no luck.

This option could REALLY benefit me right now as I am dealing with a tough issue right now.
Explained here: #268

@ahsan013
Copy link

ahsan013 commented Oct 5, 2018

Try This Removing Options for Multiple Select Drop Down.

$('#FeatureId').multiselect("deselectAll", false).multiselect("refresh");

@kuldeep111
Copy link

do this ..
$("#selectedVariables option:selected").prop("selected", false);
$("#selectedVariables option").remove();
$('#selectedVariables').multiselect('rebuild');

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

6 participants