Skip to content

val(): Update select multiple no selected statement for 3.0. Fixes #828 #955

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 5 commits into from

Conversation

kswedberg
Copy link
Member

Added a statement about the difference between >=3.0 and <3.0 when calling .val() on <select multiple> with no options selected.

@mgol
Copy link
Member

mgol commented Jul 14, 2016

Have you seen #939? What do you think about code example changes there?

@kswedberg
Copy link
Member Author

Oh, bummer! I didn't see that one. The code example change there looks fine to me. Maybe we could merge that one first. Then merge mine, keeping that code change but using my content change?

@mgol
Copy link
Member

mgol commented Jul 14, 2016

Sounds good. Would you do that?

Michał Gołębiowski

@kswedberg
Copy link
Member Author

sure.

@gibson042
Copy link
Member

LGTM.

<p>Setting values using this method (or using the native <code>value</code> property) does not cause the dispatch of the <code>change</code> event. For this reason, the relevant event handlers will not be executed. If you want to execute them, you should call <code>.trigger( "change" )</code> after setting the value.</p>
<p>The <code>.val()</code> method allows us to set the value by passing in a function. As of jQuery 1.4, the function is passed two arguments, the current element's index and its current value: </p>
<p>The <code>.val()</code> method allows settting the value by passing in a function. As of jQuery 1.4, the function is passed two arguments, the current element's index and its current value: </p>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"settting" should be "setting"

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

good catch. thanks!

@kswedberg kswedberg closed this in ef2a80e Jul 17, 2016
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.

6 participants