I\'m looking for a way to gather all of the text in a jQuery wrapped set, but I need to create spaces between sibling nodes that have no text nodes between them.
For
This is the simplest solution I could think of:
$("body").find("*").contents().filter(function(){return this.nodeType!==1;});