I have some jquery that unchecks all the checkboxes and then if one gets checked then it will uncheck all the others! I want to exclude a div on the page with some checkboxes from this!
The div to be excluded has class="addon"..
$(document).ready(function (){
$(function(){
$('input:checkbox').prop('checked', false)
$('input:checkbox').click(function(){
if($(this).is(':checked')){
$('input:checkbox').not(this).prop('checked', false);
}
});
})
recal();
});
Or how can i make the above code apply to only checkboxes inside a div with a class name of notaddon..instead of all the checkboxes on the page! ???
( EDIT: I actually Butchered the question but Roger gave me exactly what i asked for even tho its not what i meant i gave roger the check! Funny enough it was till i seen Pratik response that i realised i asked the wrong question! so he should get some credit..)