2
In this script below it marks and unchecks all checkbox but I wish that when a checkbox is "checked" and "disabled" it doesn’t change anything. The problem is that I don’t know how to do it, someone would have an idea?
<input type="checkbox"                  class='marcar'  />
<input type="checkbox" checked disabled class='marcar'  />
JS:
<button class='btn btn-large' type='button' title='Todos' id='todos' onclick='marcardesmarcar();'>
       <i class='icon-large  icon-ok'>Click</i>
</button>
<script>
function marcardesmarcar() {
    $('.marcar').each(function () {
        if (this.checked) 
           $(this).attr("checked", false);
        else 
           $(this).prop("checked", true);
    });
}
</script>