title: Keep FadeIn from firing twice
body: <p>I have this code that works well, but I can't get it to stop firing twice. Once I click a link it fades out, then it fades in to the next page, but then fades in again (and this time for some reason it scrolls down to another anchor link, ex: /#comments after fading in the second time)</p>
  <pre><code>$(document).ready(function() {
      $('body').hide().fadeIn(200);
      $(&quot;a&quot;).click(function(e) {
          e.preventDefault();
          $link = $(this).attr(&quot;href&quot;);
          $(&quot;body&quot;).fadeOut(200,function(){
            window.location =  $link; 
          });
      });
   });
  </code></pre>
  <p>Is there a way to keep it from firing twice? Or a way to modify it so that it's maxed out at only firing just once?</p>
  <p>I read somewhere that it may be because the first fadeout never finished, so it fired again, but I don't know. I'm new to a lot of this so I apologize if this is an easy question.</p>