$('#mySelect')
.find('option')
.remove()
.end()
.append('<option value="whatever">text</option>')
.val('whatever')
;
More Related Contents:
- What is the best way to add options to a select from a JavaScript object with jQuery?
- Adding options to a using jQuery?
- Change the selected value of a drop-down list with jQuery
- How to populate a cascading Dropdown with JQuery
- jQuery get specific option tag text
- Hide select option in IE using jQuery
- Removing an item from a select box
- Check if option is selected with jQuery, if not select a default
- How to use jQuery to select a dropdown option?
- What is the most efficient way to sort an Html Select’s Options by value, while preserving the currently selected item?
- How to keep cascade dropdownlist selected items after form submit?
- Creating a select box with a search option
- set option “selected” attribute from dynamic created option
- jQuery remove options from select
- Close a SELECT dropdown list programmatically with Javascript/jQuery
- How to hide optgroup/option elements?
- Can you have multiple lines in an element?
- Dynamically adding div on button click and changing Id of each?
- Get specific text from html tag jquery [duplicate]
- How to open a Bootstrap modal window using jQuery?
- How do I link a JavaScript file to a HTML file?
- Alternative to jQuery’s .toggle() method that supports eventData?
- How to refresh page on back button click?
- Get Character value from KeyCode in JavaScript… then trim
- jQuery live scroll event on mobile (work around)
- Dollar sign before self declaring anonymous function in JavaScript?
- Scrape web pages in real time with Node.js
- jQuery/Javascript to detect OS without a plugin?
- Jquery click event not firing on the element created dynamically using jquery
- Jquery change text between two elements