How can I create a jQuery wrapped-set out of individual jQuery objects?
I need to return a wrapped-set by filtering another wrapped set, however the filter is based on creating a Range object from each of the items in the first wrapped set.
What I was hoping to do was:
- nodes.find("*").each(function(){
position = obj.compare_position(this);
if(position.s_to_s != -1 && position.e_to_e != 1){
nodes.add($(this));
}
});
return nodes;
However, nodes.add($(this)); does not seem to be working. Would you have other suggestions?
FYI, obj.compare_position(this) takes this, turns it into a position and returns the comparison of the "this" range's position to the position of a current selection...