Modify ↓
Ticket #1471 (closed bug: wontfix)
filter() should accept the same arguments as not()
| Reported by: | joern | Owned by: | |
|---|---|---|---|
| Priority: | minor | Milestone: | 1.1.4 |
| Component: | core | Version: | 1.1.3 |
| Keywords: | Cc: | ||
| Blocking: | Blocked by: |
Description
Assuming that the variable selector in the following example can be a selector string and a DOM element or jQuery object:
headers.not(headers.not(selector))
This should be the same as:
headers.filter(selector)
but filter accepts only callbacks and strings.
Change History
comment:1 Changed 6 years ago by john
- Status changed from new to closed
- Resolution set to wontfix
| object). |
comment:2 Changed 6 years ago by joern
An example:
headers = $("div.header");
// some client code passing in the selector
selector = ":eq(0)"
// works, because filter accepts strings
headers.filter(selector)
// same client code, but passes in an dom element
selector = document;
// doesn't work
headers.filter(document)
// works
headers.not(headers.not(selector))
Please follow the bug reporting guidlines and use jsFiddle when providing test cases and demonstrations instead of pasting the code in the ticket.
Note: See
TracTickets for help on using
tickets.
