I have an array with HTML elements from a selector. Looks like this:
var selection = $('.features_items');
// selection = [div.features_item, div.features_item];
The div looks like this:
<div class="features_item selected" value="2">
Now I want to get all values from the div’s in the array: [2,3]
You can use
jQuery.mapto map the jQuery object to an array in a single step: