Ticket #9921 (closed bug: invalid)
Compound selectors dont work well in IE7
| Reported by: | stuart.innes@… | Owned by: | stuart.innes@… |
|---|---|---|---|
| Priority: | low | Milestone: | None |
| Component: | event | Version: | 1.4.3 |
| Keywords: | Cc: | ||
| Blocking: | Blocked by: |
Description
tried something like in IE7 $(".item1 a, .item2 a").live('click',function(){
do stuff
})
The script will timeout(prompt to force stop) with medium data-sets (about 150-200 matching items)or takes an inordinate length of time to complete.
Change History
comment:1 Changed 22 months ago by timmywil
- Owner set to stuart.innes@…
- Priority changed from undecided to low
- Status changed from new to pending
- Component changed from unfiled to event
comment:2 Changed 22 months ago by dmethvin
It wouldn't surprise me that this peformed poorly in IE6/7, since the only way to satisfy that query is to make a pass through the entire document to find the correct classes and descendants. And it has to be done each time a click occurs. Other browsers support querySelectorAll so they can do this faster.
Try a better-qualified selector, using ids or just a single class selector qualified by a tag name, such as div.itemX.
comment:3 Changed 22 months ago by trac-o-bot
- Status changed from pending to closed
- Resolution set to invalid
Because we get so many tickets, we often need to return them to the initial reporter for more information. If that person does not reply within 14 days, the ticket will automatically be closed, and that has happened in this case. If you still are interested in pursuing this issue, feel free to add a comment with the requested information and we will be happy to reopen the ticket if it is still valid. Thanks!
comment:4 in reply to: ↑ description Changed 20 months ago by alex@…
Replying to stuart.innes@…:
tried something like in IE7 $(".item1 a, .item2 a").live('click',function(){
do stuff
})
The script will timeout(prompt to force stop) with medium data-sets (about 150-200 matching items)or takes an inordinate length of time to complete.
the bug is that selecting $('#a #b #c'); is not working in ie7, to solve it I used $('#a #b').find('#c');
this bug should be reopened
Please follow the bug reporting guidlines and use jsFiddle when providing test cases and demonstrations instead of pasting the code in the ticket.

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.