Closed helga-hai closed 5 years ago
Just call moveTo method on click function.
$(".anim-mouse").on("click", function() {
var section_index = $('.main section.active').index();
var section_length = $('.main section').length - 1;
console.log(section_length);
console.log(section_index);
if (section_index == section_length) {
$(".main").moveTo(0);
}
$('.main').moveDown();
});
Thank you very much for the answer. The scroll is happening. But when I press the button - the page reloads. Why is this happening?
try this code
$('.reload.btn').bind('click', function(e){ $(".main").moveTo(2); e.preventdefault(); });
and if you using a tag then you need to provide the value like Link
Thanks. It worked.
How I make scroll to section 2 when click button (Section 1)?
This not work.