Take the 2-minute tour ×

Problem: I'm attempting to disable a radio button by using the code below. This always dims the radio button, but it still responds to mouse events (in Opera, the button is actually selected with a tick mark, but the tick is dimmed).

$('input:radio[name=admission1][value=1]').attr("disabled", true);
      ...still executed when button dimmed... why?

I've also tried

$('input:radio[name=admission1][value=1]').prop("disabled", true);

but it makes no difference. How can I disable mouse actions on the button? Thanks.


Some html:

<div id="radioAMethod" class="ui-widget-content ui-corner-all effect">
   <h4 class="ui-widget-header ui-corner-all">Admission method</h4>
   <input type ="radio" 
          name ="admission1" 
          id   ="admissionCheckBox0"
   <input type ="radio" 
          name ="admission1" 
          id   ="admissionCheckBox1"
   <input type ="radio" 
          name ="admission1" 
          id   ="admissionCheckBox2"

The code in the click function I showed above does correctly fire when the button is not disabled, and is clicked. Thanks.


Should have said, but only just realised - this code uses the buttons from http://widowmaker.kiev.ua/checkbox/. If the code should work, then I guess the problem is actually in his JS somewhere.

share|improve this question
Your selector refers to a radio, but the ID is named checkbox. Can you post your HTML? –  James Wiseman Jan 11 '12 at 12:37
What browser? Did you try with other browser(s)? –  Shadow Wizard Jan 11 '12 at 12:53

1 Answer 1

up vote 1 down vote accepted

I think you're doing something wrong

in this example: http://jsfiddle.net/VVP5G/ you'll see a working situation where the disabled input doesn't trigger the click event.

Are you sure the ID correspond to the radio input?

share|improve this answer
Thanks for the jsfiddle code. Curious. My button clearly dims when 'disable' is applied, but I still get a mouse event on click. I can see it on the front end, as well being sure that the ID is correct. What confuses me is this thread: stackoverflow.com/questions/6703098/…, where an Opera dev says "The "disabled" attribute merely means that the element will not do its normal action when clicked. I don't really see any reason why setting disabled should prevent firing mouseover/move". –  EML Jan 11 '12 at 12:50

Your Answer


