Landing pull request 382. Adds support for number values (meter,progress); Fixes #9319.
More Details: - https://github.com/jquery/jquery/pull/382 - http://bugs.jquery.com/ticket/9319
This commit is contained in:
parent
a1545b5079
commit
f82b9dddc4
2 changed files with 31 additions and 1 deletions
|
@ -165,7 +165,13 @@ jQuery.fn.extend({
|
|||
return ret;
|
||||
}
|
||||
|
||||
return (elem.value || "").replace(rreturn, "");
|
||||
ret = elem.value;
|
||||
|
||||
return typeof ret === "string" ?
|
||||
// handle most common string cases
|
||||
ret.replace(rreturn, "") :
|
||||
// handle cases where value is null/undef or number
|
||||
ret == null ? "" : ret;
|
||||
}
|
||||
|
||||
return undefined;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue