Is there a simple way to get a node list (including the given node) matched by a query with Jquery?
I thought about using the .find method as following:
var getNodes = function(dom, query){
var nodes = $(dom).find(query || '*');
nodes.splice(0,0,dom);
return nodes;
}
Olivier
If you want to search inside a set made of
domand its contents for elements matching a query, then you can door
A simpler one (but slower if there are many children) would be