i have checkboxes and i want to get the value and attribute value of checked box.
<input type="checkbox" class="checkedtransfer nomargin" id="'.$r->id.'" enrollno="'.$r->enrollno.'" />
now in jquery i want to store the values and attribute value of each checked checkboxes in one array.
so far this works for me, i did two map function which return the correct values, but i want it in one array only. can i simplify my existing code?
var id = checkboxes.map(function(){ return $(this).attr("id"); }).get();
var enrollno = checkboxes.map(function(){ return $(this).attr("enrollno"); }).get();
enrollnotodata-enrollnobecauseenrollnois not a valid attribute.