Cleaned it up a bit (didn't need to loop through attributes) - see below. Still doesn't work in IE though.
On 21/12/06, Sam Collett <[EMAIL PROTECTED]> wrote: > else if(node.childNodes[i].nodeType > == 1) { > attr = {}; > > if(node.childNodes[i].attributes[0]) { > for(j=0; > j<node.childNodes[i].attributes.length; j++) { > > attr[node.childNodes[i].attributes[j].localName] = > node.childNodes[i].attributes[j].nodeValue; > } > } > > $(appendTo).append(jQuery.create( > > node.childNodes[i].nodeName, attr, '' > )); > > loopChildren(node.childNodes[i], $(appendTo).find(":last")[0]); > } else if(node.childNodes[i].nodeType == 1) { $(appendTo).append(node.childNodes[i].cloneNode(false)); loopChildren(node.childNodes[i], $(appendTo).find(":last")[0]); } _______________________________________________ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/