Skip to content

val(): Updated description for the setter version#744

Closed
AurelioDeRosa wants to merge 3 commits into
jquery:masterfrom
AurelioDeRosa:patch-3
Closed

val(): Updated description for the setter version#744
AurelioDeRosa wants to merge 3 commits into
jquery:masterfrom
AurelioDeRosa:patch-3

Conversation

@AurelioDeRosa
Copy link
Copy Markdown
Member

Fixes: gh-712

@gibson042
Copy link
Copy Markdown
Member

the option whose value appears last in the array will be selected.

I'm not sure we want to lock ourselves into that behavior. It's not terribly likely to change, but it's also not a great idea to pass in junk and let us sort it out. I'd rather not dignify (or encourage) it with recognition.

@AurelioDeRosa
Copy link
Copy Markdown
Member Author

Thank you for the feedback @gibson042. Anyone wants to comment before I update the PR?

@AurelioDeRosa
Copy link
Copy Markdown
Member Author

PR updated.

@AurelioDeRosa
Copy link
Copy Markdown
Member Author

Anyone keen to review this PR?

@gnarf
Copy link
Copy Markdown
Member

gnarf commented Jun 8, 2015

One question I have about this behavior after reading the changed text:

  • Will $( "input.checkboxes" ).val( anArrayOfValues ) set elem.checked = false if the value is not in the array as well?

@AurelioDeRosa
Copy link
Copy Markdown
Member Author

@gnarf Yes, it does. I'll update the PR accordingly.

PR updated based on the feedback
@AurelioDeRosa
Copy link
Copy Markdown
Member Author

Can you double check this PR @arthurvr?

@AurelioDeRosa AurelioDeRosa deleted the patch-3 branch July 19, 2015 23:42
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.

Clarify description of .val( array )

4 participants