I have a group of checkboxes, and as long as any one of the boxes is checked
I need a function bound to a select list, but anytime none of the boxes are
checked I need the function unbound. What I have below binds and unbinds,
but if I select lets say 4 checkboxes the function is bound and called
I have a group of checkboxes, and as long as any one of
the boxes is checked I need a function bound to a select
list, but anytime none of the boxes are checked I need the
function unbound. What I have below binds and unbinds,
but if I select lets say 4 checkboxes the function is bound
and
Hi Brian -
Here is how I would change your code:
$('[EMAIL PROTECTED]').click(function(){
$('#label').unbind('change');
if ( $([EMAIL PROTECTED]'label_checkbox']:checked).length )
$('#label').bind('change', function(){
alert('test');
});
});
By making it