Hi guys,
I want to show something correspondingly as soon as a user chooses an option in a select element in html. So I need to get the selected option value immediately via jquery when a user makes his choice. My jquery is as follows(pretty simple):
$(‘select’).live(‘click’, function(event){
console.log($(‘select’).val());
});
But the problem is, every time I click the select element, it will show the current value of it first, and then show the value you choose when you click an option, which is not what I want. I don’t need the current value, I just want the value you choose this time. So how should I achieve this in jquery?