jquery / jquery/api.jquery.com

.val(value) documentation should discuss checkboxes more accurately

Open
#991 1 comment 0 reactions 1 assignee View on GitHub

@AurelioDeRosa is already working on this.

Since Dec 19, 2016.

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

Description

I created the following issue on the jQuery forums:

http://forum.jquery.com/topic/val-value-does-not-work-on-checkboxes-if-value-is-not-an-array

I like the alternative method brought up by Jake, as it seems more clean. The way that jQuery works does make sense; however, the documentation is misleading. It doesn't state that the use of an Array is required, rather it states that you can use Arrays. I would add a note related to Jakes alternate method for checkboxes, as a better way of working with checkboxes.

Take it easy,
Will

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.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.