Added possibility to add number or number[] to .val()

This commit is contained in:
Michal Baše
2015-11-06 08:57:46 +01:00
parent 35989a3ab4
commit 70d024cba1
2 changed files with 3 additions and 1 deletions
+2
View File
@@ -3128,6 +3128,8 @@ function test_val() {
$("#single").val("Single2");
$("#multiple").val(["Multiple2", "Multiple3"]);
$("input").val(["check1", "check2", "radio1"]);
$("input").val(1);
$("input").val([1, 2, 3]);
}
function test_selector() {
+1 -1
View File
@@ -1365,7 +1365,7 @@ interface JQuery {
*
* @param value A string of text or an array of strings corresponding to the value of each matched element to set as selected/checked.
*/
val(value: string|string[]): JQuery;
val(value: string|string[]|number|number[]): JQuery;
/**
* Set the value of each element in the set of matched elements.
*