allows something like:
var divs = jQuery('div');
jQuery('a', divs);
docs say:
$$('#navbar a', '#sidebar a');
// -> all links within the elements of ID "navbar" or "sidebar"
Which I took to mean that it is performing the same thing as this in jQuery: jQuery('#navbar a, $sidebar a');
So I guess the question is what should the marked line be:
var divs = $$('div');
var inner_spans = $$('span', divs); // * marked line
The select
function as Diodeus listed, is what I think I was after.
var divs = $$('div');
var spans = [];
divs.each(function(div){
spans.push(div.select('span'));
});
Really, the only bit I cared about was the div.select('span')
, pushing them into an array wasn't really the goal here :)