How do I write a click event in jQuery that will capture the value of a dropdown? I have:
var select = $('select #dealerName');
$(function {
select.click(function {
alert( $('#dealerName').val() );
});
});
I'm just trying to get the value -- that's why I'm alerting it. What would the click function look like? The id on my dropdown is "dealerName". The above is not alerting anything.