I have 3 checkboxes , I want to attach the click event on 2 but not the third . I am writing
<input type=checkbox />
<input type=checkbox />
<input type=checkbox id='selectAll' />
Script:
jQuery('input:checkbox:not(input#selectAll)').click(function(){
///my code comes here
});
The problem is click event is getting attached to all the checkboxes . I do not want the click event to get attached to the checkbox with id = selectAll.