How do I set a new value in the scrolltop, instead of being 0, for example, an 'x' number.
this.liveScroller.dom.scrollTop = 563;
How do I set a new value in the scrolltop, instead of being 0, for example, an 'x' number.
this.liveScroller.dom.scrollTop = 563;
The scrollTop method works on all modern browsers:
Example:
JavaScript
Window Top Scroll:
window.scrollY
Top Scroll of an element:
document.getElementsByTagName('div')[0].scrollTop
jQuery
Window Top Scroll:
jQuery(window).scrollTop();
Top Scroll of an element:
jQuery('#teste').scrollTop();