mirror of
https://github.com/jquery/jquery.git
synced 2024-11-23 02:54:22 +00:00
Made it so that you can set the text value of elements to numbers (in addition to strings). (Fix for bug #1386)
This commit is contained in:
parent
78db847ef2
commit
42f30dd181
2
src/jquery/jquery.js
vendored
2
src/jquery/jquery.js
vendored
@ -565,7 +565,7 @@ jQuery.fn = jQuery.prototype = {
|
|||||||
* @cat DOM/Attributes
|
* @cat DOM/Attributes
|
||||||
*/
|
*/
|
||||||
text: function(e) {
|
text: function(e) {
|
||||||
if ( typeof e == "string" )
|
if ( typeof e != "object" && e != null )
|
||||||
return this.empty().append( document.createTextNode( e ) );
|
return this.empty().append( document.createTextNode( e ) );
|
||||||
|
|
||||||
var t = "";
|
var t = "";
|
||||||
|
Loading…
Reference in New Issue
Block a user