title: awful jankiness when moving elements via $(element).css('top')
body: <p>I have a stack of 'pages' that I'm trying to move on mousewheel, such that the top one moves more than the one underneath it, etc. They're <code>position: absolute</code>, and currently I'm adjusting the CSS <code>top</code> to move them around, but it is veeery slow and janky.</p>
  
  <p>EDIT: took down demo, problem solved.</p>
  
  <p>Relevant code:</p>
  
  <pre><code>window.onScroll = (e, delta) -&gt;
      e.preventDefault()
  
      minHeight = 5
      maxHeight = 800
      top_scale = 50
      second_scale = 5
      third_scale = 1
      stack = $('.card_stack').first().children()
      top = $(stack[stack.length - 1])
      second = $(stack[stack.length - 2])
      third = $(stack[stack.length - 3])
  
      for pair in [[top, top_scale], [second, second_scale], [third, third_scale]]
          pair[0].css('top', parseInt(pair[0].css('top'), 10) + delta*pair[1] + 'px')
  
  $(window).mousewheel(window.onScroll)   # jQuery mousewheel plugin  
  </code></pre>
  
  <p>I tried looking at this in the Frames tab of Chrome to figure out what's so slow, and got this: <a href="https://dl.dropbox.com/u/407870/static/Screen%20Shot%202012-11-20%20at%201.44.33%20PM.png" rel="nofollow noreferrer">https://dl.dropbox.com/u/407870/static/Screen%20Shot%202012-11-20%20at%201.44.33%20PM.png</a></p>
  
  <p>It looks like there's not really much going on, but maybe I'm missing something. A previous, unanswered question related to the Frames problem I'm having: <a href="https://stackoverflow.com/questions/11423330/web-inspector-profiling-with-frames-finding-the-cause-of-performance-problems">Web inspector profiling with &quot;Frames&quot;: finding the cause of performance problems when nothing appears in the timeline</a></p>
  
  <p>I know there are a bunch of other things that should be cleaned up before any kind of release (eg, I'm compiling Less and Coffeescript in-page) but the scrolling is my current concern, as it is central to my premise.</p>
  
  <p>How can I best speed this up?</p>