-
Notifications
You must be signed in to change notification settings - Fork 262
Closed
Description
The behaviour of the lt selector changed between version 1.7 and 1.8 in the way it handles negative numbers. in 1.7 :lt(-1) selects nothing in 1.8+ :lt(-1) excludes from the end of the array.
I've created a JS fiddle to demonstrate this:
jQuery 1.6 - http://jsfiddle.net/Z5QYz/
jQuery 1.8 - http://jsfiddle.net/Z5QYz/1/
You'll see in the 1.6 version none of the divs are selected, while in the 1.8 version the last one is.
It would be nice to have a 'As of jQuery 1.8 ...' note in the documentation.
EDIT: this also applies to the :gt selector
Thanks.
Metadata
Metadata
Assignees
Labels
No labels