Opened 12 years ago
Closed 11 years ago
#8906 closed bug (fixed)
.(prevAll('span:has(input,select,textarea)')
Reported by: | anonymous | Owned by: | |
---|---|---|---|
Priority: | high | Milestone: | 1.8 |
Component: | selector | Version: | 1.5.2 |
Keywords: | Cc: | ||
Blocked by: | Blocking: |
Description
In this case, prevAll returns elements "in order of the DOM" instead of "in order of closest to element"
Example:
<div> Works Correctly: <span>One</span> <span>Two</span> <span>Three</span> <a href="javascript:void(0)" onclick="alert($(this).prevAll('span').first().text());">test</a> <span>Five</span> <span>Six</span> </div> <div> Doesn't Work Correctly: <span><input />One</span> <span><input />Two</span> <span><input />Three</span> <a href="javascript:void(0)" onclick="alert($(this).prevAll('span:has(input,select,textarea)').first().text());">test</a> <span><input />Five</span> <span><input />Six</span> </div>
Change History (5)
comment:1 Changed 12 years ago by
comment:2 Changed 12 years ago by
Component: | unfiled → traversing |
---|---|
Priority: | undecided → high |
Confirmed
comment:3 Changed 12 years ago by
Status: | new → open |
---|
comment:5 Changed 11 years ago by
Component: | traversing → selector |
---|---|
Milestone: | 1.next → 1.8 |
Resolution: | → fixed |
Status: | open → closed |
Note: See
TracTickets for help on using
tickets.
i created ticket... having problems when setting author. hopefully it works this time.
Here's a JSFiddle: http://jsfiddle.net/2Lrvy/