[jQuery] Re: $(...).children() vs $().childNodes()

2007-04-27 Thread John Resig
If you wanted to do it right, you'd want to do something like this: jQuery.fn.childNodes = function() { return this.pushStack( jQuery.map( this, jQuery.makeArray(a.childNodes) ) ); }; HUGE WARNING! (this is why we don't include this method in jQuery right now) jQuery does not expect itself

[jQuery] Re: $(...).children() vs $().childNodes()

2007-04-27 Thread Ⓙⓐⓚⓔ
I've used this code with xml returned from ajax ... it may work for Jon. John, how would you make this code better? $.fn.xml = function () {return $.xml(this[0])} $.xml = function(xml) { // dump the xml back to html text if (!xml) return var res = var tag = xml.nodeName var