Show hide div through checkbox in JQuery
<p>JQuery:<br></p>

<pre><code>$('#chkCaption').live("click", function() {
    if ($('#chkCaption').attr("checked")) {
        $('#divCaption').show();
    }
    else {
        $('#divCaption').hide();
    }
});
</code></pre>

<p>But it is not work.Help to find my mistake or suggest the way.Thanks.</p>
