mirror of
https://github.com/jquery/jquery.git
synced 2026-02-06 21:37:37 -05:00
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:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user