I have a set of checkboxes with class checkbox_item
.I need to loop through all checkboxes which are not checked and their second part of splitted #ID
value , ie $('.checkbox_item').prop('id').split('_')[1]
should not be equal to zero
<input class="checkbox_item" id="414_0.5" type="checkbox">test
<input class="checkbox_item" id="415_1" type="checkbox">test1
<input class="checkbox_item" id="416_0.5" type="checkbox">test2
<input class="checkbox_item" id="417_0" type="checkbox">test3
My jquery function is as following:
$('.checkbox_item').not(':checked').each(function(index,elem){
/here I dont need checkboxes whose splitted #ID [1] not equals to zero
});
I have google it and couldn't find anything positive.Thanks in advance
Aucun commentaire:
Enregistrer un commentaire