HTML
<label for="chkEle">Check This</label>
<input type="checkbox" name="chkEle" />
<div id="divEle" style="display:none;"><date stuff></div>
JS
$("input[name=chkEle]").change(function(e) {
$("#divEle").toggle();
});
.change is triggered even if the label is clicked instead of the checkbox. This also allows you to dynamically make change in js later. For instance if you wanted to force the checkbox selection on page load, then at the end of you code you could add $("input[name=chkEle]").change();
and that would trigger the change both on the back end and visually
0
solved Show or hide a field using jQuery or Ajax [closed]