Is this code correct?
function gotoPage(id) {
("html, body").animate({
scrollTop: $("."+id).offset().top
}, 2000);
}
What I am trying to do is. That I created DIVs, with 100% of height, they have certain classes .
.
I included jQuery, and I wanted to click on anchor and scroll to that certain page.<a href="#" onClick="gotoPage(id that I want scroll to)">Lipsum</a>
Does it work? Nope.
What's wrong with it?