I am looking for a simple jquery script to validate a simple form exactly like this:
in my form, i have only one checkbox, if that checkbox is checked, i want to enable the second checkbox and if the second checkbox is checked, i want to enable the third checkbox, etc. there will no more than one single checkbox for this form.
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js"></script>
<script type="text/javascript">
$(document).ready(function() {
$('#tester').hide();
$('#toggler').click(function() {
if ($('#toggler').is(':checked')) {
$('#tester').slideDown("slow");
} else {
$('#tester').slideUp("fast");
}
});
});
</script>
</head>
<body>
<div id="tester"><input type="checkbox" id="toggler2" value="off"/></div>
<input type="checkbox" id="toggler" value="off"/>
</body>
thanks