I've a several li elements which have as class : multiselect_selected_profil.
<li id="li60" class="multiselect_my_profil multiselect_selected_profil" data-id="60">
<span class="multiselect_profil">C1</span>
</li>
I would like that for each li that has this specific class, I get its data-id and then put it into an array. At then end of the process I would like to have an array which contains all the ids.
Here is what I've tried :
$(".multiselect_selected_profil").each(function(){
var iObjetId = $(this).attr('data-id');
// ???
}