16
rated 0 times
[
17]
[
1]
/ answers: 1 / hits: 97363
/ 12 Years ago, thu, february 7, 2013, 12:00:00
I am trying to hide div when user clicks on checkbox, and show it when user unchecks that checkbox.
HTML:
<div id=autoUpdate class=autoUpdate>
content
</div>
jQuery:
<script>
$('#checkbox1').change(function(){
if (this.checked) {
$('#autoUpdate').fadeIn('slow');
}
else {
$('#autoUpdate').fadeOut('slow');
}
});
</script>
I am having a hard time to get this working.
More From » jquery