Here\'s a little jQuery function that does what I want when a checkbox is clicked, but I have a basic gap in my knowledge:
How to register this so that it deals with ch
$(document).ready(function() {
$('fieldset input:checkbox').click(handleClick)
.filter(':checked').each(handleClick);
});
function handleClick(){
if ($(this).attr('name') == 'foo') {
// hide checkbox 'bar'
}
else {
// show checkbox 'bar'
}
}
You might need to add some logic in your handleClick function to make sure you know what state the checkbox is in. You can do this by calling $(this).is(':checked');