Skip to content

the .index() with No Arguments ? #395

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from

Conversation

johnkpaul
Copy link
Contributor

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
Copy link
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
Copy link
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
Copy link
Author

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

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

@johnkpaul Did you want to fix this?

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

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

@johnkpaul
Copy link
Contributor

Bump. @scottgonzalez

@scottgonzalez
Copy link
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
Copy link
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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

3 participants