From 42f30dd1812fc0ee262eaa43f0a354d8e439938c Mon Sep 17 00:00:00 2001
From: John Resig <jeresig@gmail.com>
Date: Fri, 20 Jul 2007 19:41:17 +0000
Subject: Made it so that you can set the text value of elements to numbers (in
 addition to strings). (Fix for bug #1386)

---
 src/jquery/jquery.js | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

(limited to 'src')

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 = "";
-- 
cgit v1.2.3