Skip to content

fix invalid :eq index (introduced in a3565d9) #376

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
Closed

fix invalid :eq index (introduced in a3565d9) #376

wants to merge 1 commit into from

Conversation

chocolateboy
Copy link
Contributor

No description provided.

@mgol
Copy link
Member

mgol commented Oct 19, 2013

This is incorrect; :eq(1) does select the second element; for selecting the first use :eq(0).

@mgol mgol closed this Oct 19, 2013
@dmethvin
Copy link
Member

The correction looks like it is needed to me. the current version says:

$( ".myclass:eq(2)" ) selects the second element in the document with the class myclass

@dmethvin dmethvin reopened this Oct 19, 2013
@kswedberg kswedberg closed this in f2dc385 Oct 19, 2013
@kswedberg
Copy link
Member

So the pull request is invalid, but that paragraph needs to be updated. Since it says, "selects the second element in the document with the class myclass, rather than the first," I'm guessing at some point that selector was changed from :eq(1) to :eq(2). Anyway, fixed in f2dc385

@chocolateboy
Copy link
Contributor Author

chocolateboy commented Oct 19, 2013

I'm guessing at some point that selector was changed from :eq(1) to :eq(2)

There's no need to guess: "introduced in a3565d9".

the pull request is invalid

No it isn't, and the "fix" you've committed is less clear than the old (pre-a3565d9) example (why on earth would one illustrate a 0-based index with :eq(2)?), but whatever...

@scottgonzalez
Copy link
Member

I agree. The PR should've landed instead of changing the sentence.

@dmethvin
Copy link
Member

Either way corrects the problem, but I agree it would be preferable to have landed the original PR since it pointed out the issue. @chocolateboy have you signed the CLA? If you're planning to make other contributions it would help to do that since we can't land anything until you do.

@chocolateboy
Copy link
Contributor Author

@chocolateboy have you signed the CLA?

I'll sign it if necessary, but I was hoping I could avoid it for a 1-character patch :-) I've never spotted any issues with the jQuery documentation apart from this, so I can't see myself becoming a regular contributor.

@kswedberg
Copy link
Member

Sorry. I misread the pull request.Of course it's valid. My bad.

@kswedberg kswedberg reopened this Oct 20, 2013
@kswedberg
Copy link
Member

In fact, it was originally written correctly as :eq(1) until a code cleanup commit this summer changed it. probably a typo.

@kswedberg
Copy link
Member

@chocolateboy: I know it might seem silly to sign a CLA for one character, but we really want to do the right thing for all concerned. As it states, "This license protects You, the jQuery Foundation and licensees; it does not change your rights to use your own Contributions for any other purpose." It should take less than a minute to read it and digitally sign at http://contribute.jquery.org/CLA/ Once you've done that, I'll merge your pull request ASAP.

Thanks so much, and sorry again for the misunderstanding.

@mgol
Copy link
Member

mgol commented Oct 20, 2013

@chocolateboy Sorry, I've mixed the lines in the diff, you were obviously correct!

@chocolateboy
Copy link
Contributor Author

@kswedberg: OK, I've signed it.

@kswedberg
Copy link
Member

@chocolateboy: thank you! Commit merged at 916f055 and deployed.

@kswedberg kswedberg closed this Oct 21, 2013
@scottgonzalez
Copy link
Member

@chocolateboy Can you please sign the CLA again, this time with your real name?

@chocolateboy chocolateboy deleted the fix_eq_index branch October 22, 2013 02:05
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.

5 participants