You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi, I just noticed this while trying out the code snippets on jsFiddle - it seems that .index() returns the index of the first item not the last item as of jQuery 1.91. If you run the snippet using 1.83 it uses the last one.
The docs are wrong here. Before this fix the method didn't return consistent results, now it does. we just need to remove that note and add one that before 1.9 you should ensure that the .index() method is only passed one element or the results may be incorrect.
However 54946db fixed the examples, adding a note on the bug might still be welcome. If you don't know about the issue, the examples are now even more confusing. I'il open a PR this afternoon.
Hi, I just noticed this while trying out the code snippets on jsFiddle - it seems that .index() returns the index of the first item not the last item as of jQuery 1.91. If you run the snippet using 1.83 it uses the last one.
This is on the page at http://learn.jquery.com/using-jquery-core/understanding-index/
The text was updated successfully, but these errors were encountered: