I have a div with an anchor wich i would like to use to go to an other div on the page:
<div class="scroll-down"><a href="#" class="next">See portfolio</a></div>
I have the following jQuery function:
$(".next").click(function(event) {
event.preventDefault();
$('html, body').animate({
scrollTop: $(this).closest('.portfolio').next().offset().top
}, 800, 'easeOutExpo');
});
when the anchor is clicked the page should scroll to a div with the class portfolio, but nothing is happening. What am I doing wrong?
Thank you in advance