Side navigation
#8260 closed bug (duplicate)
Opened February 13, 2011 02:23AM UTC
Closed February 13, 2011 07:19PM UTC
Last modified February 13, 2011 07:19PM UTC
.filter(selector) does not select properly
Reported by: | cstavro | Owned by: | |
---|---|---|---|
Priority: | high | Milestone: | 1.next |
Component: | selector | Version: | 1.5 |
Keywords: | Cc: | ||
Blocked by: | Blocking: |
Description
When using $(selector).filter(selector) to select and filter elements, the results are unexpected in certain situations.
Sample is at:
Thanks for taking the time to contribute to the jQuery project by writing a bug report and providing a test case!
After checking your report and your test case I determined that this is a already known bug. You can check the ticket mentioned below for progress on this issue.
In case it's not clear why the "direct" selector (
$(...)
) works but withfilter(...)
doesn't or why these two bugs have indeed the same root cause:.filter(...)
uses Sizzle also for qSA-aware browsers.P.S.: As some other selector related bugs have been fixed for jQuery .1.5 you can work around this problem (when using 1.5) by escaping the dot in your filter selector like this
.filter("[id^='Favourite[Music]\\\\.Song[Jazz]']")