I need to make additional content appear when a user selects a checkbox. I have the following code:
<!DOCTYPE html>
<html>
<head>
<title>Checkbox</title>
<script type="text/javascript">
$(document).ready(function(){
$('#checkbox1').change(function(){
if(this.checked)
$('#autoUpdate').fadeIn('slow');
else
$('#autoUpdate').fadeOut('slow');
});
});
</script>
</head>
<body>
Add another director <input type="checkbox" id="checkbox1"/>
<div id="autoUpdate" class="autoUpdate">
content
</div>
</body>
</html>
Would really appreciate some help, good knowledge of HTML5, CSS3 but very basic JavaScript/jQuery.