Bug Tracker

Opened 5 years ago

Closed 5 years ago

Last modified 5 years ago

#9096 closed bug (fixed)

Selector or find bug in jQuery 1.6

Reported by: nazar-pc@… Owned by: nazar-pc@…
Priority: low Milestone: 1.6.1
Component: selector Version: 1.6
Keywords: Cc:
Blocked by: Blocking:


I used next code with jQuery 1.5 - 1.5.2, but after updating to jQuery 1.6 this code doesn't works. My example:

<select multiple onChange="$(this).find('option[value=\'russian\']').attr('selected', 'selected');" name="core[active_languages][]" size="5">

<option value="english">English</option> <option selected value="russian">Русский</option>


P.S. Sorry for my english

Change History (3)

comment:1 Changed 5 years ago by timmywil

  • Component changed from unfiled to selector
  • Owner set to nazar-pc@…
  • Priority changed from undecided to low
  • Status changed from new to pending

Thanks for taking the time to contribute to the jQuery project! Please provide a reduced test case on http://jsFiddle.net that reproduces the issue experienced to help us assess your ticket. Additionally, test against the jQuery (edge) version to ensure the issue still exists.

Works for me: http://jsfiddle.net/timmywil/9GN8G/1/.

comment:2 Changed 5 years ago by anonymous

I have the same result on my site, as on: http://jsfiddle.net/timmywil/9GN8G/1/ But, when change framework to jQuery 1.5.2 - example works good.

comment:3 Changed 5 years ago by timmywil

  • Milestone changed from 1.next to 1.6.1
  • Resolution set to fixed
  • Status changed from pending to closed

Oh, I see the different behavior. I saw it was getting selected on blur, but you'd like it selected before that. Switching to .prop will give you the same behavior as before. Nevertheless, this will work as before in 1.6.1.


Note: See TracTickets for help on using tickets.