Is there any elegant way of turning [$(div), $(span), $(li)]
into $(div, span, li)
?
What I need is a jQuery-wrapped set of elements instead of
Edit: I thought jQuery supported all Array
methods, but nay, so here's a working version of my initial solution, albeit it's a bit odd since I am sticking to the same methods:
var set; // The array of jQuery objects,
// but make sure it's an Array.
var output = set.pop();
$.each(set, function (_, item) {
return [].push.call(output, [].pop.call(item));
});