Complete action before starting next action
<p>I have the following which doesn't work</p>

<pre><code>$('#select').val( jQuery.url.param("id") );
$('#button').click();
</code></pre>

<p>It seems that the click executes before the line above it finishes.  How do I ensure that the first line is finished before the click gets executed?</p>

<p>As the click action depends of the value in the select control being set.  I am currently getting results based on the first option in the select control.</p>
