title: Jquery Hover image and Alt text - execution order?
body: <p>I've a very simple jQuery script to change an image and display the alt text when a thumbnail is hovered over.</p>
  
  <p>Both image and Alt text display in the same div. The code works but the text displays before the image changes and so briefly resizes the div for long alt text:</p>
  
  <pre><code>$("#thumbwrapper li img").hover(function(){
      $('#main_img').attr('src',$(this).attr('src').replace('thumb/', ''));
      $("#desc").html( $(this).attr("alt") );
  });
  </code></pre>
  
  <p>I need to order these two so the IMAGE changes 1st and then the alt text. I'm guessing I need to nest a second function but don't know how.
  This is my guess of nesting function() but it just breaks the alt text changing:</p>
  
  <pre><code>$("#thumbwrapper li img").hover(function(){
      $('#main_img').attr('src',$(this).attr('src').replace('thumb/', ''),function(){
          $("#desc").html( $(this).attr("alt") );
      });
  });
  </code></pre>