How to remove all theoptions of a select box using jQuery |
X

Congrats, You are Subscribed to Receive Updates.

How to remove all theoptions of a select box using jQuery


How to remove all the options of a select box using jQuery. With the help of jQuery we need can remove all the options from Selectbox. The following code will help you to remove all the  options in the list.

  
$('#element-id-or-class')
    .find
('option')
    .remove()
    .end();

And also you can delete elements one by one.

Here the code to delete one by one.

$('#mySelect')
    .find
('option')
    .remove();

You can try it.

commenter

About Varadharaj V

The founder of Kvcodes, Varadharaj V is an ERP Analyst and a Web developer specializing in WordPress(WP), WP Theme development, WP Plugin development, Frontaccounting(FA), Sales, Purchases, Inventory, Ledgers, Payroll & HRM, CRM, FA Core Customization, PHP and Data Analyst. Database Management Advance Level

Comment Below

Your email address will not be published. Required fields are marked *

*

Current ye@r *

Menu

Sidebar