mirror of
https://github.com/jquery/jquery.git
synced 2024-11-23 02:54:22 +00:00
Fixed appending rows to a table.
This commit is contained in:
parent
5139bfbec8
commit
83c7532161
8
jquery/jquery.js
vendored
8
jquery/jquery.js
vendored
@ -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];
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user