Thursday, December 27, 2012

Re: [Rails] Nested Attributes and Radio Buttons -- any way to do this?

On Dec 27, 2012, at 6:33 AM, Gauthier D. wrote:

> Compared to "real" radio groups, I loose the ability to quickly get the
> "group value" but I don't need that in my case.

You might try this:

$$('input[data-radio-group="foo"][checked]').first().getValue();

That's Prototype, but you should be able to translate to jQuery -- they both use Sizzle under the hood, and the selector's the thing that matters here.

Walter

--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

0 Comments:

Post a Comment

Subscribe to Post Comments [Atom]

<< Home


Real Estate