Reputation: 10066
All, I have multiple selects on my page all with the same class. The class is called event_selection. Whenever someone changes one of these selects I'd like to get the selected option value with jQuery.
How can I go about doing that?
Thanks!
Upvotes: 0
Views: 385
Reputation: 87073
$('.event_selection').on('change', function() { // bind change event
// get the value
alert( this.value ); // or $(this).val(), but previous one is faster
});
Upvotes: 1
Reputation: 35194
$('.event_selection').change(function(){
alert($(this).val());
});
This thread is possibly a duplicate of 500 others though...
Upvotes: 1