Hi all,
Anybody know what the jQuery selector is for the "selected" value of a
option_groups_from_collection_for_select
I'm trying to listen for a button click and then determine whether the
user has selected an item from a dropdown or not... (not the same
button)
Coffee:
$('.landing_edit_questions_btn').click ->
if $('#minisections').val()??? == "Select an Area"
alert('Select an area!')
erb:
<%= select_tag :minisections,
option_groups_from_collection_for_select(Subsection.order(:title),
:minisections, :title, :id, :title), :prompt => "Select an Area" %>
Any help appreciated!
Thanks DaveC
--
Posted via http://www.ruby-forum.com/.
--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscribe@googlegroups.com.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/259ded335c9f2d634d2fac67c74e1067%40ruby-forum.com.
For more options, visit https://groups.google.com/groups/opt_out.
No comments:
Post a Comment