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:
70cab83
)
There was an issue with my table/tbody detection.
author
John Resig
<jeresig@gmail.com>
Tue, 20 Jun 2006 15:42:10 +0000
(15:42 +0000)
committer
John Resig
<jeresig@gmail.com>
Tue, 20 Jun 2006 15:42:10 +0000
(15:42 +0000)
jquery/jquery.js
patch
|
blob
|
history
diff --git
a/jquery/jquery.js
b/jquery/jquery.js
index
6263607
..
86041dc
100644
(file)
--- a/
jquery/jquery.js
+++ b/
jquery/jquery.js
@@
-423,10
+423,13
@@
$.fn.domManip = function(fn){
var obj = this;
if ( this.nodeName == 'TABLE' ) {
- if ( !this.firstChild ) {
- this.appendChild( document.createElement("tbody") );
- }
- obj = this.firstChild;
+ var tbody = this.getElementsByTagName("tbody");
+
+ if ( !tbody.length ) {
+ obj = document.createElement("tbody");
+ this.appendChild( obj );
+ } else
+ obj = tbody[0];
}
$.apply( obj, fn );