Reputation: 7233
I have this piece of jQuery code:
var scrollTop = jQuery(window).scrollTop();
How do I have to rewrite it for Prototype? I tried $$(window).scrollTop and $(window).scrollTop, doesnt work.
Thanks!
Upvotes: 1
Views: 2198
Reputation: 1150
Have a look here:
http://api.prototypejs.org/dom/document/viewport/
document.viewport.getScrollOffsets()['top'];
Upvotes: 1