So we have a situation where we need to clone all of an elements childNodes
(including whitespace & text nodes). The code below is an attempt to add a
childNodes() function that behaves similar to children() except for it
includes the childNodes.

Comments/houghts/suggestions/feedback?

$.fn.childNodes = function() {
   return this.pushStack( this.get(0).childNodes || [] );
};

Cheers,
-js

Reply via email to