Skip to content
Permalink
Browse files

Fixed appending rows to a table.

  • Loading branch information
jeresig committed Jun 13, 2006
1 parent 5139bfb commit 83c75321619f9968e4373a13aced5f83d4228962
Showing with 8 additions and 0 deletions.
  1. +8 −0 jquery/jquery.js
@@ -387,8 +387,16 @@ $.clean = function(a) {
var r = [];
for ( var i = 0; i < a.length; i++ ) {
if ( a[i].constructor == String ) {
if ( a[i].indexOf("<tr") == 0 ) {
//alert("tr");
var tr = true;
a[i] = "<table>" + a[i] + "</table>";
}
var div = document.createElement("div");
div.innerHTML = a[i];
if ( tr ) {
div = div.firstChild.firstChild;
}
for ( var j = 0; j < div.childNodes.length; j++ ) {
r[r.length] = div.childNodes[j];
}

0 comments on commit 83c7532

Please sign in to comment.
You can’t perform that action at this time.