git.asbjorn.biz
/
jquery.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
78db847
)
Made it so that you can set the text value of elements to numbers (in addition to...
author
John Resig
<jeresig@gmail.com>
Fri, 20 Jul 2007 19:41:17 +0000
(19:41 +0000)
committer
John Resig
<jeresig@gmail.com>
Fri, 20 Jul 2007 19:41:17 +0000
(19:41 +0000)
src/jquery/jquery.js
patch
|
blob
|
history
diff --git
a/src/jquery/jquery.js
b/src/jquery/jquery.js
index
57685b3
..
8e370f8
100644
(file)
--- 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 = "";