Skip to content
Permalink
Browse files
There was an issue with my table/tbody detection.
  • Loading branch information
jeresig committed Jun 20, 2006
1 parent 70cab83 commit 057381c
Showing 1 changed file with 7 additions and 4 deletions.
@@ -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 );

0 comments on commit 057381c

Please sign in to comment.