jquery / jquery/api.jquery.com

:checkbox, :password and other selectors have innacurate documentation

Open
#495 10 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
HTML
Stars
325
Forks
260
PR merge metrics
No merged PRs in 30d

Description

By checking http://api.jquery.com/checkbox-selector/ (and others similarly) we are told that

$( ":checkbox" ) is equivalent to $( "[type=checkbox]" ). (...)

But that is false:

$('<span type="checkbox"></span>').is(":checkbox") // yields false
$('<span type="checkbox"></span>').is("[type=checkbox]") // yields true

I know that usually that attribute is used in <input> elements, but that does not make the documentation statement true.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the checkbox selector documentation at api.jquery.com/checkbox-selector/ and inspect the similarly documented :password and other selectors mentioned in the issue. Compare each stated equivalence with the supplied jQuery examples, then update inaccurate wording and verify that the documentation matches the selector behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
jquery
Domain
documentation
Issue type
Documentation
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.