aboutsummaryrefslogtreecommitdiffstats
path: root/src/jquery
diff options
context:
space:
mode:
authorJohn Resig <jeresig@gmail.com>2007-07-20 19:41:17 +0000
committerJohn Resig <jeresig@gmail.com>2007-07-20 19:41:17 +0000
commit42f30dd1812fc0ee262eaa43f0a354d8e439938c (patch)
tree738a32a00c3b23825c69ac8cff014cd5de1c19fa /src/jquery
parent78db847ef201a66f88e9ad330b2e51c65c58abb3 (diff)
downloadjquery-42f30dd1812fc0ee262eaa43f0a354d8e439938c.tar.gz
jquery-42f30dd1812fc0ee262eaa43f0a354d8e439938c.zip
Made it so that you can set the text value of elements to numbers (in addition to strings). (Fix for bug #1386)
Diffstat (limited to 'src/jquery')
-rw-r--r--src/jquery/jquery.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/jquery/jquery.js b/src/jquery/jquery.js
index 57685b31d..8e370f8ed 100644
--- a/src/jquery/jquery.js
+++ b/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 = "";