Question

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.

Was it helpful?

Solution

You need to surround the selector modifier with single-quotes:

!!$(":radio[name='"+group+"']:checked").length) 
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top