I need to wrap up an array of elements into a jQuery object as if they were selected so that I can call various jQuery actions on them.
I'm looking for a function like foo below that accepts an array of elements and returns a jQuery object with them in it.
var elements = [element1, element2, element3];
$(foo(elements)).click(function() {
...
});
Can someone shed some light on this?
Thanks much.
elementsin the first place?