How to retain checkbox state in jQuery
<p>I have added the followng code to disable the dropdown on unchecking the checkbox in jQuery, but the checkbox is not retaining the value:</p>

<pre><code>$(document).ready(function(){
    //on check of the checkbox,the dropdown is enabled or disabled.
    $("[id$=chkCashSettlementType]").toggle(
    function()
    {
        $("[id$=ddlSettlementCurrency]").attr('disabled',$("[id$=chkCashSettlementType]").not(':checked'));
        $("[id$=chkCashSettlementType]").attr('checked',false);
    },
    function()
    {
        $("[id$=ddlSettlementCurrency]").removeAttr('disabled');
        $("[id$=chkCashSettlementType]").attr('checked',true);
    }
    )
});
</code></pre>

<p>Where did I go wrong?</p>
