-
Notifications
You must be signed in to change notification settings - Fork 264
val: Remove use of nonstandard selectors #994
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
Conversation
@@ -13,20 +13,20 @@ | |||
<longdesc> | |||
<p>The <code>.val()</code> method is primarily used to get the values of form elements such as <code>input</code>, <code>select</code> and <code>textarea</code>. When called on an empty collection, it returns <code>undefined</code>.</p> | |||
<p>When the first element in the collection is a <code>select-multiple</code> (i.e., a <code>select</code> element with the <code>multiple</code> attribute set), <code>.val()</code> returns an array containing the value of each selected option. <strong>As of jQuery 3.0</strong>, if no options are selected, it returns an empty array; <strong>prior to jQuery 3.0</strong>, it returns <code>null</code>.</p> | |||
<p>For selects, checkboxes and radio buttons, you can also use the <a href="/selected-selector/">:selected</a> and <a href="/checked-selector/">:checked</a> selectors to get at values. For example:</p> | |||
<p>For selects, checkboxes and radio buttons, you can also use the <a href="/checked-selector/">:checked</a> selector to get at values. For example:</p> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"to get at values" -> "to get their values"?
}); | ||
</code></pre> | ||
<p>This example appends the string " items" to the text inputs' values.</p> | ||
<p>This example removes leading and trailing whitespace from the text inputs' values.</p> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"inputs' values." ->"inputs' values. Only inputs having tags
as a class name are selected."
@AurelioDeRosa updated. |
Fixes gh-993