I'm trying to scroll the page down when I click a button with an animation to a certain distance, currently, I'm able to scroll down to a certain element but this is not what I want, I want to scroll down to a certain distance in pixels.
I've tried lots of variation but they don't seem to work in my case, at least not how I want them to.
Anyway, here's the code:
$(document).ready(function(){
$('.next_section').click(function(){
$('html, body').animate({
scrollTop: $('.img_div').offset().top
}, 1000);
});
}