I have html page. And I want to scroll down on button click ( button has class "s_down_button" ) with animation.
I need scroll screen on element_height + 20 pixels down.
element_height - height of element with "tp-bgimg" class
So I try:
jQuery(document).ready(function($) {
$(".s_down_button").click(function(){
var element_height = $(".tp-bgimg").height();
var scroll_height = element_height +20;
$('body').scrollTo(scroll_height);
});
});
but I get an error:
Uncaught TypeError: $(...).scrollTo is not a function