Take the 2-minute tour ×

The following code displays the new selected value if it is different from the current value:


    <option value='123'>123</option>
    <option value='456'>456</option>
    <option value='789'>789</option>


$(function() {
    $('select').change(function() { alert($(this).val()); });

I would like to display the value whenever an option selected (even if it is the currently selected value).

How could I achieve this ?

share|improve this question
add comment

1 Answer

up vote 2 down vote accepted

Hook on the click event. It'll be a bit more often fired, but that's the best you can get.

share|improve this answer
add comment

Your Answer


