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 42f30dd1812fc0ee262eaa43f0a354d8e439938c
Showing with 1 addition and 1 deletion.
  1. +1 −1 src/jquery/jquery.js
@@ -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.
You can’t perform that action at this time.