I want to add an easing style into my smooth scrolling code, but whenever I do it throws a constantly increasing jquery error in the console.
$('#slider-scrollDown').click(function() {
$('html, body').animate({
scrollTop: $("#scrollTo-container").offset().top
}, 2000);
});
This is what I have, and I'm trying to add an easing like this:
$('#slider-scrollDown').click(function() {
$('html, body').animate({
scrollTop: $("#scrollTo-container").offset().top
}, 2000, 'easeInOut');
});
The errors I receive in the console are:
Uncaught TypeError: n.easing[this.easing] is not a function
Which displays once, and then another below it with an increasing number in red, which doesn't stop.