Side navigation
#7863 closed bug (fixed)
Opened December 29, 2010 07:18PM UTC
Closed December 29, 2010 09:15PM UTC
Last modified April 23, 2011 06:10PM UTC
Setting value of select based on ID containing brackets does not work
Reported by: | faded1@gmail.com | Owned by: | |
---|---|---|---|
Priority: | low | Milestone: | 1.5.1 |
Component: | selector | Version: | 1.4.4 |
Keywords: | Cc: | ||
Blocked by: | Blocking: |
Description
Example:
<select id="foo[bar]"> <option>One</option> <option>Two</option> <option>Three</option> </select> <script type="text/javascript"> $('#foo\\\\[bar\\\\]').val('Three'); // Does nothing in Jquery 1.4.4 </script>
This issue has already been fixed. I know because i spent an hour the other day triaging this exact same issue with someone who found it on IRC!
https://github.com/jeresig/sizzle/commit/786ee06119c6d040d05817545e074fbdfb0d452d
You can use the latest GIT version on jsFiddle to confirm that the behaviour is fixed.