Reputation: 5325
I'm hoping someone can help out with this. I modified code from jQuery and radio button groups but cannot get it to work. Here is my HTML:
https://gist.github.com/1319498
Here is the jquery:
https://gist.github.com/1319503
I fail the if statement in !!$(":radio[name="+group+"]:checked").length) and never set valid to true whether I chose a radio button or not.
Upvotes: 2
Views: 621
Reputation: 92893
You need to surround the selector modifier with single-quotes:
!!$(":radio[name='"+group+"']:checked").length)
Upvotes: 2