Win a copy of Think Java: How to Think Like a Computer Scientist this week in the Java in General forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Use JQuery to Disable Radio Button

 
Steve Dyke
Ranch Hand
Posts: 1619
1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am trying to use jQuery to disable a specific radio button in a particular group.

this is not working:

 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64827
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Have you verified that the selector is actually selecting the element?

Hint: type the jQuery call part of the statement into Chrome's JavaScript console. It will show you what is selected.
 
Steve Dyke
Ranch Hand
Posts: 1619
1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Bear Bibeault wrote:Have you verified that the selector is actually selecting the element?

Hint: type the jQuery call part of the statement into Chrome's JavaScript console. It will show you what is selected.


I have got this to work but for what ever reason this will not let me un-check the check box that fires this code once I check it.


I chanced this and got it to work:

 
Eric Pascarello
author
Rancher
Posts: 15385
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Do you realize there is no need for that if statement, simplify the code.

 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic