Bug Tracker

Opened 6 years ago

Closed 6 years ago

#14112 closed bug (duplicate)

Selected HTML option not working with Jquery after 1.5 version

Reported by: quantaoflight@… Owned by:
Priority: undecided Milestone: None
Component: unfiled Version: 1.10.1
Keywords: Cc:
Blocked by: Blocking:

Description

For the HTML <select id="routetype" name="routetype">

<option value="fastest">Fastest</option> <option selected="true" value="balanced">Balanced</option> <option value="quietest">Quietest</option>

</select>

when the jquery statement written below is executed, the default value is not shown on screen, however in the DOM it is set correctly.

$("#routetype > [value='quietest']").attr("selected", "true");

Change History (2)

comment:1 Changed 6 years ago by quantaoflight@…

http://jsfiddle.net/x3UyB/4/

See this jfiddle for reference. Select the onLoad option to see the result.

comment:2 Changed 6 years ago by timmywil

Resolution: duplicate
Status: newclosed

Duplicate of #13245.

Note: See TracTickets for help on using tickets.