So when i tick a checkbox i want an element to show and then hide when unchecked.
<div class="hndle">
<table class="form-table">
<td class="left">
Environmental Findings
</td>
<td>
<input type="checkbox" class="check">
</td>
</table>
</div>
<div class="hndle">
<textarea></textarea>
</div>
<div class="hndle">
<table class="form-table">
<td class="left">
Recommendations
</td>
<td>
<input type="checkbox" class="check">
</td>
</table>
</div>
<div class="hndle">
<textarea></textarea>
</div>
Okay so when the checkbox is clicked i want it to show the next div with the class hndle.(the one which has a textarea inside).
This is the jQuery code i have attempted with but no luck getting it working.
$('.check').change(function(){
if($(this).is(':checked')){
$(this).parents('hndle').next().show();
}else{
$(this).parents('hndle').next().hide();
}
});