Here is some code that checks if a radio button is disabled. How do I reform this to make the radio unchecked if it is currently disabled? And yes I still want to remove the parent css class. Thanks.
$('input:disabled', true).parent().removeClass("style1");
Why won’t this work?
$('input:disabled', true).attr('checked', false).parent().removeClass("style1");
Similar:
- jQuery does not return checked radio value I have a form with several radio elements, each names “rx” (where x is 1..3), .buttonset() applied. with e.g id=3 alert ($('input:radio[name=r'+id+']').val()); //returns value of...
- Checkbox and JQUERY: "is checked" always FALSE The code is below and checkbox is always FALSE. But on page it is different. It doesn’t get checked or unchecked. <script type="text/javascript"> $('.cbOzelHastaAdi').unbind('click'); $('.cbOzelHastaAdi').click(...
- Monitoring DOM Changes in JQuery Is there a way to detect when the disabled attribute of an input changes in JQuery. I want to toggle the style based on the...
- Auto Check Radio Box if it is the only one being displayed So, I have radio boxes of the form <li><input type="radio" name="names" value="blah"><a>Some text (blah)</a></li> There are 100 plus of these radio buttons. Now, I have...
- disable all check boxes following code work fine but 1 error $(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')...
Tags: attr, checks, radio button, work input