Q:

Using scrollTop to show pixels scrolled

Im wanting to to display the number of pixels a user has scrolled in my site by using the scrollTop method in jQuery. I would like the number of pixels to appear in a class called 'pixels'. 
Therefore I could have
<p><span class="pixels"><!--number of pixels here--></span> Pixels Scrolled</p>

I found a website that does does it at it's footer. Its exactly what I want to do! You can find the site here http://chartbeat.com/ 
Although I have been looking and can't seem to find out how to do it. Any help would be greatly appreciated. Thanks in advance.

A:

Next time try a little harder before you ask:
$(function(){
  var $w = $(window), display = $(".pixels");

  $w.on("scroll", function(e){
    $display.text($w.scrollTop())
  });
});
​

http://jsfiddle.net/Mb45L/2/

