Side navigation
#3694 closed bug (invalid)
Opened December 06, 2008 09:30AM UTC
Closed December 07, 2008 07:31PM UTC
Last modified December 08, 2008 03:15PM UTC
class selector bug in find()
Reported by: | janis.zalitis | Owned by: | |
---|---|---|---|
Priority: | major | Milestone: | 1.3 |
Component: | selector | Version: | 1.2.6 |
Keywords: | Cc: | janis.zalitis | |
Blocked by: | Blocking: |
Description
When using find() to filter out elements of collection that have certain class, I get an empty array.
Dumping the collection shows the elements with that class are there, yet fin() ignores them.
Attachments (1)
Change History (3)
Changed December 07, 2008 07:31PM UTC by comment:1
cc: | → janis.zalitis |
---|---|
component: | core → selector |
need: | Patch → Review |
resolution: | → invalid |
status: | new → closed |
Changed December 08, 2008 07:31AM UTC by comment:2
Wait, the code is as follows:
var pics2 = $('div.item2').find('img')
$(pics2).find('.grey').hide()
In the first line I get the collection of "img" and then I'm trying anything that has a class "grey" in that collection.
Both the 2nd and 3rd example are wrong, you're looking for .grey inside img.grey. So it's obviously not going to find it.
Next time, post something like this to jQuery's google group.