Skip to content Skip to sidebar Skip to footer

Unable To Handle Disable Check Box

my html:

Solution 1:

If you're using jQuery 1.6 or higher, don't use .attr() anymore, there is .prop() instead:

$('selector goes here').prop('checked', false);

Solution 2:

Try this:

Adding a .not('[disabled]') in your statement will do the trick

$('.check .sfCheckbox').not('[disabled]').attr('checked', false);

This statement will uncheck all 'enabled' check boxes with class sfCheckbox that are inside an element with class check

Solution 3:

You can try this example. The explaination is that with $('.check') you are getting the div element and not the checkboxes. You havo to provide checkboxes selectors to achieve what you wanto

Solution 4:

Try:

if(!$(".check").is(":disabled")) {
 $(this).attr('checked', false);

}

Solution 5:

Working code:

if($("input").attr("disabled")==undefined)
        $('input').removeAttr('checked','checked');

Post a Comment for "Unable To Handle Disable Check Box"