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, OpenCart Theme Development, PHP, HTML, CSS, jQuery, Bootstrap development and content SEO.

Comment Below

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

*

Current ye@r *

Menu

Sidebar

Subscribe E-mail Updates

Congrats, You are Subscribed to Receive Updates.

Advertisement

Category Posts