$(document).ready(function() {
$("#contact_menu").click(function() {
$(body).scrollTo("#contact", 800);
});
});
I typed this in my code, hoped it would make my page scroll, but I won't work. I tried several ways, but I can't get it right.
I hope one of you can help me.
Try this:
$("#contact_menu").click(function() {
$("body").animate({
scrollTop: $("#contact").offset().top
}, 2000);
});
jsFiddle: http://jsfiddle.net/hescano/43umh/
Were you trying this plugin? http://demos.flesler.com/jquery/scrollTo/
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With