jQuery - why doesn't attr.src change?
<p>I have an image that when click I want to have changed and then have the browser jump to a new URL.  I'm using .one so that the user can only click the image once.</p>

<pre><code>     jQuery('#launch_button').one('click', function() {
      jQuery("#launch_button").attr("src", "images/button_launch2_grey.png");
      window.location.href = 'test.html';
     });
</code></pre>

<p>If I comment out the window.location.href the image changes properly.  If I do the opposite and comment out the attr change the window.location.href works but the image does not change first.  How do I get the first line (attr change) to finish/work before doing the window.location.href?</p>
