mirror of
https://github.com/jquery/jquery.git
synced 2026-04-20 03:01:22 -04: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:
2
src/jquery/jquery.js
vendored
2
src/jquery/jquery.js
vendored
@@ -565,7 +565,7 @@ jQuery.fn = jQuery.prototype = {
|
||||
* @cat DOM/Attributes
|
||||
*/
|
||||
text: function(e) {
|
||||
if ( typeof e == "string" )
|
||||
if ( typeof e != "object" && e != null )
|
||||
return this.empty().append( document.createTextNode( e ) );
|
||||
|
||||
var t = "";
|
||||
|
||||
Reference in New Issue
Block a user