Commit 42f30dd1 authored by John Resig's avatar John Resig

Made it so that you can set the text value of elements to numbers (in addition...

Made it so that you can set the text value of elements to numbers (in addition to strings). (Fix for bug #1386)
parent 78db847e
......@@ -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 = "";
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment