I have the following to capture the checkbox check event of form with id="form1":
$('#form1 :checkbox').click(function() {
var $this = $(this);
alert($this.val());
}
I now have another form (id="form2") with checkboxes for which I need to handle events. Is there any way to combine both forms into a single line and have the alert
still pop up the correct value? i.e. something like
$('#form1 OR #form2 :checkbox').click(function() {
var $this = $(this);
alert($this.val());
}