the .index() with No Arguments ? #395

Closed
wants to merge 1 commit into
from

Projects

None yet

3 participants

@jackxu2011

I test the code with jquery 1.10.1 in firefox. and the result is opposite with the
discription 'When .index() is called on a jQuery object that contains more than one element, it does not calculate the index of the first element as might be expected, but instead calculates the index of the last element. ' .
tt

@johnkpaul
Contributor

You're right, @jackxu2011. Testing this now, it seems like this is a change that happened from 1.8 to 1.9. If you want to submit a PR with the changes to the article, that would be great. If not, I'll update this ASAP.

@scottgonzalez
Member

The behavior that's documented in this article is actually just a bug in a few versions of jQuery. Getting the index of the last item was never intended.

@jackxu2011

Ok. But I don't know how to submit a problem, just update it ASAP.

@jackxu2011 jackxu2011 closed this Jul 10, 2013
@scottgonzalez
Member

@johnkpaul Did you want to fix this?

@scottgonzalez scottgonzalez reopened this Jul 10, 2013
@johnkpaul
Contributor

@scottgonzalez Yes, I'll fix it this weekend.

@johnkpaul
Contributor
@scottgonzalez
Member

Sorry @johnkpaul, GitHub doesn't send notifications when new commits are added, so this is the first I saw the update. Can you sign the CLA?

@johnkpaul
Contributor

Ah that's no problem. I forgot about it for a while myself. I was just going back through my PRs this morning.

Just signed the CLA.

@johnkpaul johnkpaul closed this in 54946db Sep 24, 2013
@arthurvr arthurvr pushed a commit to arthurvr/learn.jquery.com that referenced this pull request Jan 4, 2015
@johnkpaul @scottgonzalez johnkpaul + scottgonzalez Fixes #395, update index article with indended and 1.9+ behavior. fe1734e
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment