Skip to content

Commit

Permalink
Made it so that you can set the text value of elements to numbers (in…
Browse files Browse the repository at this point in the history
… 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.
2 changes: 1 addition & 1 deletion src/jquery/jquery.js
Expand Up @@ -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 = "";
Expand Down

0 comments on commit 42f30dd

Please sign in to comment.