I have a page contain the select code as follows:
<select id="select-choice">
<option value="0">Please Select</option>
<option value="1">red</option>
<option value="2">white</option>
</select>
How can I change the text of option 1 from red to green after the page finishes loading? So far I have the following:
//following is the code
$('#newoutagePage').live('pageshow', function(event) {
$('#select-choice[value="1"]').text("green");
}
but it doesn’t work. Any suggestions?
You should select option instead of select box. see DEMO
jquery selectors