I’ve looked around for a while, but there doesn’t seem to be a simple way to do this. jQuery doesn’t help the in least, it seems to entirely lack any support for selection or DOM ranges. Something which I hoped would be as simple as $.selection.filter('img') seems to only be doable with dozens of lines of code dealing with manually enumerating elements in ranges and browser implementation inconsistencies (though ierange helps here). Any other shortcuts?
I’ve looked around for a while, but there doesn’t seem to be a simple
Share
The nodes in the selection will be removed and returned in a
DocumentFragment, and you can now access thechildNodesoffragmentjust like you would any element.