disable all check boxes
<p>following code work fine but 1 error</p>

<pre><code>$(document).ready(
function() {


 $("#myCheckboxes input[type='checkbox']").change(function() {
    var checked = $("#myCheckboxes input[type='checkbox']:checked").length;

        if(checked == 4){
           $("#myCheckboxes input[type='checkbox']")
            .attr('disabled',true)
            .find(':checked')
            .attr('disabled',false)
    } else {
        $("#myCheckboxes input[type='checkbox']").attr('disabled',false);
    }


 });
 });
</code></pre>

<p>after selection become 4 all check box become disable even selected one, but i don't want to disable selected check box's.</p>

<p>Thanks</p>
