Skip to content
Permalink
Browse files
Made it so that you can set the text value of elements to numbers (in…
… addition to strings). (Fix for bug #1386)
  • Loading branch information
jeresig committed Jul 20, 2007
1 parent 78db847 commit 42f30dd
Showing 1 changed file with 1 addition and 1 deletion.
@@ -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 = "";

0 comments on commit 42f30dd

Please sign in to comment.