Skip to main content

Bug Tracker

Side navigation

#13738 closed bug (notabug)

Opened April 05, 2013 06:14PM UTC

Closed April 05, 2013 08:25PM UTC

Problem to define Attr to a select > option tag in Google Chrome

Reported by: Owned by:
Priority: undecided Milestone: None
Component: attributes Version: 1.9.1
Keywords: Cc:
Blocked by: Blocking:


I am trying to define Attr to a select > option tag in Google Chrome, using jQuery 1.9.1. It works fine on Firefox 19.0.2 and Opera 12.14, but not on Chrome Version 26.0.1410.43 nor on Safari 6.0.1. This is the code:

<!DOCTYPE html PUBLIC "-W3CDTD XHTML 1.0 TransitionalEN" "">

<html xmlns="">


<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />






<option value="11">aa</option>

<option value="22">bb</option>

<option value="33">cc</option>

<option value="44">dd</option>



<script src=""></script>



$('select option:last').attr('selected','selected');





Attachments (0)
Change History (1)

Changed April 05, 2013 08:25PM UTC by gibson042 comment:1

component: unfiledattributes
resolution: → notabug
status: newclosed

Use .prop to update the dynamic selectedness of options.