#3850 closed bug (wontfix)
.find('>') fails in jq 1.3
Reported by: | StaticShock | Owned by: | john |
---|---|---|---|
Priority: | major | Milestone: | 1.3.1 |
Component: | selector | Version: | 1.3 |
Keywords: | children selector | Cc: | |
Blocked by: | Blocking: |
Description
this used to be a valid selector in 1.2.6, equivalent to .children()
here's a test case:
javascript:alert($('div').find('>').length);void(0)
Milestone: 1.3.1 Version: 1.3
Change History (4)
comment:1 Changed 15 years ago by
Milestone: | → 1.3.1 |
---|---|
Resolution: | → wontfix |
Status: | new → closed |
Version: | → 1.3 |
comment:2 Changed 15 years ago by
yes, but a query such as:
.find('>:last div').end()
now turns into:
.children(':last').find('div').end().end()
which is hardly as pleasant as it used to be in 1.2.6
comment:3 Changed 15 years ago by
also, it can't be used as easily with other selectors. for instance, take a stab at re-writing this valid 1.2.6 code:
.find('>.deviceChooser>.remButton,>.addButtonContainer>.customAddButton')
comment:4 Changed 15 years ago by
I think there's some confusion here. .find("> div") works (or should work). I'm saying that .find(">") should not work.
Note: See
TracTickets for help on using
tickets.
I don't think we can guarantee that being a valid selector, thankfully we have a drop-in replacement. Instead of .find('>') just do: