Question: ```
$('#id').change(function () {
    if ( $('#id option:selected').val() == 'choice1') { 
                    // do stuff
                }
    else if ( $('#id option:selected').val() == 'choice2' ) {
                    // do different stuff
                }
});

```

So what's going on here is choice1 is selected by default when the page loads. When I change the dropdown to choice2, nothing happens the first time. When I change it the second time back to choice1, it actually reads the value from the previous selection (choice2). So it's like one step behind with the values, like it is taking the value before the change happens.

Any tips would be greatly appreciated!

Thanks a lot!

UPDATE: Thanks all but there must be something else going on with the rest of the JS on the site that is using this. I had tried .val() before, and it behaves in the exact same way as option:selected - there is a one iteration delay, so it starts working after the first choice but it's behind by one. I have seen this problem before, but I really don't remember how I fixed it. I'll have to answer my own post when I do. Thanks for the responses everyone!

Answer: 
This might work

```
$('#id').change(function () {
    if ( $(this).val() == 'choice1') { 
                    // do stuff
                }
    else if ( $(this).val() == 'choice2' ) {
                    // do different stuff
                }
});

```

An example for you, <http://jsfiddle.net/MdGex/>
just use `$(this).val()`; instead of `$('#id option:selected').val()`

the val of the select box will be the val of the selected option.