• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

jQuery 1.8.2 Disable Radio Button

 
Steve Dyke
Ranch Hand
Posts: 1619
1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
This was working in jQuery 1.7.2 but is not working with 1.8.2

 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64715
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Try quoting radio.
 
Eric Pascarello
author
Rancher
Posts: 15385
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If you looked at the console it should say:

Error: Syntax error, unrecognized expression: [input[type=radio][value="PPM"]


which really seems to show the problem.



 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64715
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Heh, missed that, Good eye.
 
Steve Dyke
Ranch Hand
Posts: 1619
1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Bear Bibeault wrote:Try quoting radio.


Thanks.

There are several little glitches I am having since moving to jQuery 1.8.2 like some hyperlinks or input tags, even radio buttons that have an onclick event have to be clicked twice before the event fires.
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64715
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Many of these may be a result of tightening up on leniency with selector errors; such as not quoting attribute values. I'd go through and verify that your selectors all work as expected wherever you are having problems.

The JavaScript console is your best bud for things like this.
 
Michael Matola
whippersnapper
Ranch Hand
Posts: 1817
4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Bear Bibeault wrote:Many of these may be a result of tightening up on leniency with selector errors; such as not quoting attribute values.


When I saw the question I too thought the problem was that radio wasn't in quotes. I was pretty surprised to see in the jQuery documentation that the attribute value "can be either an unquoted single word or a quoted string."

http://api.jquery.com/attribute-equals-selector/

So it looks like [type=radio] is valid. But I hear what Bear's saying about about tightening up on leniency. It's valid currently. I'd tend to future-proof it by putting radio in quotes.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic