2

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.

Community
  • 1
  • 1
Mark Locklear
  • 4,586
  • 1
  • 40
  • 73

1 Answers1

2

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

!!$(":radio[name='"+group+"']:checked").length) 
Blazemonger
  • 86,267
  • 25
  • 136
  • 177
  • THANK YOU! THANK YOU! THANK YOU! THANK YOU! THANK YOU! Spent the last 2 days on this. Someone give mblase some votes (My rep is not high enough yet). – Mark Locklear Oct 27 '11 at 14:08
  • @Lumbee Well, you can always accept the answer instead. http://meta.stackexchange.com/q/5234/171394 – Blazemonger Oct 27 '11 at 14:09