How to remove all options?
See original GitHub issueDear all, If I have a multiselect like:
<select id='pre-selected-options' multiple='multiple'>
<option value='elem_1'>elem 1</option>
<option value='elem_2'>elem 2</option>
<option value='elem_3'>elem 3</option>
<option value='elem_4'>elem 4</option>
</select>
$('#pre-selected-options').multiSelect();
I wanna remove all options in #pre-selected-options
. How can I do it?
Issue Analytics
- State:
- Created 6 years ago
- Comments:10
Top Results From Across the Web
How do you remove all the options of a select box and then ...
First clear all exisiting option execpt the first one(--Select--) · Append new option values using loop one by one $('#ddlCustomer').find('option ...
Read more >jQuery: Remove all the options of a select box and then add ...
jQuery Practical Exercises with Solution: Remove all the options of a select box and then add one option and select it with jQuery....
Read more >Remove all options from a drop-down with JavaScript and ...
This post will discuss how to remove all options from a drop-down list with JavaScript and jQuery... jQuery has .remove() method for removing...
Read more >How to remove all the options of a select box and then add ...
We select all the options in the select box using the find() method with a parameter of “option“. Then, we remove all the...
Read more >How to remove all options within a Html select box using JQuery
How to remove all options within a Html select box using JQuery ... $('#selectBox').empty().append('<option>New Option</option>');. This will add ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
View this post https://github.com/lou/multi-select/issues/193
$('#my-multi').empty().multiSelect('refresh');
Thank you so much, it work properly.