How to collect primitive values from each element into a native array using an open each-loop?
Compact syntax with timing methods:
1
var valueArray = $($('.some').each().attr(name)).get();
Compare this to the old way with more syntactic fluff:
1
2
3
var valueArray = $('.some').map(function(){
return $(this).attr(name);
}).get();