Made it so that you can set the text value of elements to numbers (in addition to...
[jquery.git] / src / jquery / jquery.js
index 57685b3..8e370f8 100644 (file)
@@ -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 = "";