jQuery .change() returning current value instead of after change takes place
<pre><code>$('#id').change(function () {
    if ( $('#id option:selected').val() == 'choice1') { 
                    // do stuff
                }
    else if ( $('#id option:selected').val() == 'choice2' ) {
                    // do different stuff
                }
});
</code></pre>

<p>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.</p>

<p>Any tips would be greatly appreciated!</p>

<p>Thanks a lot!</p>

<p>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!</p>
