I can’t get my head around how to do this?
Given a page full of anchor tags, I only want to select those elements with the CSS property display:block.
I think I can do it with a jQuery loop (warning pseudo code!)
var myarray;
$('a').each(function(arg1, arg2) {
if ($(arg2).css('display')=='block')
myarray.push(arg2);
}
But isn’t there a simpler way?
You can use
filterwith a function as the parameter.