title: jQuery easing animation of window scroll in Firefox (bug or my bad?)
body: <p><strong>THE EXAMPLE</strong><br>
  First and foremost, here's my code and problem:<br>
  <a href="http://www.nathanstpierre.com/MBX/showoff.html" rel="nofollow noreferrer">http://www.nathanstpierre.com/MBX/showoff.html</a></p>
  
  <p><strong>THE ISSUE</strong><br>
  So what I'm seeing is when you click the buttons on the left, the window scrolls to the appropriate heading. In every browser but Firefox (including... IE <em>gasp</em>) this is very smooth. However, if you reduce the height of the window, it becomes smooth on all computers. I've already tried this on multiple computers and on IE 7-8, Google Chrome, Safari, and Firefox 3.5. I've eliminated every bit of graphic and color on the page, so those aren't the issue. I've gotten rid of the sidebar that follows you, that's not it.</p>
  
  <p><strong>THE THEORY</strong><br>
  I think that the jQuery easing plugin calculates the distance that you're needing to go, and then divides up the number of pixels it needs to move per unit of duration specified (say 300 pixels over 30 milliseconds, so 10px/ms). Every other browser seems to be able to make this a smooth transition, but maybe the granularity provided by the window scroll event is not compressed enough for Firefox to make this appear smooth? Or maybe I'm using the wrong easing plugin, or the wrong settings.</p>
  
  <p><strong>THE CODE</strong></p>
  
  <pre><code>$("#sidenav a").click(function () {
          $("#sidenav a").animate({'color':'#6d6d6d'},{"duration":400});
          $(this).animate({"color":"#fff"},{"duration":400});
          clicktarget=$(this).attr("href");
          $("html, body").animate({scrollTop: $(clicktarget).offset().top},{"duration":300,"easing":"easeout"});
          return false;
        });
  </code></pre>
  
  <p><strong>THE LOGIC</strong>  </p>
  
  <p>Add an event listener to each a tag on the sidenav onClick. This will get the offset().top of the element in the document with the same ID as the href attribute of that link, and then animate from the current scrollTop to the offset().top of that element. The logic is sound, and works smoothly in every browser EXCEPT Firefox... as far as I can tell.</p>
  
  <p><strong>THE PLEA</strong>  </p>
  
  <p>What am I doing wrong? Is this a bug? </p>
  
  <p>Thanks!</p>
  
  <p><strong>THE UPDATE</strong></p>
  
  <p>Well I can't in good conscience choose any of the answers presented here, as none of them have actually given a resolution to the issue, so if you're following this pick your favorite and the bounty will go to the one with the highest votes. </p>
  
  <p>The issue appears to be the way that Firefox a) renders transparency and b) deals with scrolling events. Potentially with enough processor power this is a non-issue, but what makes me sad is that IE (of all browsers) is capable of rendering this fine on inferior hardware. I'll approach Mozilla with the issue and see if they've got anything to say about it. </p>
  
  <p>For extra edification, the following are provided at no charge:</p>
  
  <p><a href="http://www.nathanstpierre.com/MBX/transtest.php" rel="nofollow noreferrer">With Transparency</a><br>
  <a href="http://www.nathanstpierre.com/MBX/transtest.php?transparent=no" rel="nofollow noreferrer">Without Transparency</a>  </p>
  
  <p>EDIT: So the question has been answered, but now I can't choose it. Anyone know what's up with that? </p>
  
  <p><strong>FINAL UPDATE</strong>
  Enough time had passed that they let me have the bounty back, so I chose the answer that was correct. It looks like box-shadow and a few other effects cause some scrolling issues in firefox because of the way they render. FF 4.0 + handles this better, but some computers still have issues. This is a great heads up for people implementing CSS3: test the interaction on all browsers and see if the performance costs are justifiable.</p>