i have done this http://jsfiddle.net/thilakar/WsxJy/3/ using with anchor tag and name attributes.
but i need to do using with jquery like below link. http://www.jibevisuals.com/
when click on "about us" menu page moves slowly up. I need that kind of work.
Any suggestion
Thanks in advance.
You can do this using jQuery.offset()
and jQuery.animate()
.
Check out the jsFiddle Demonstration.
function scrollToAnchor(aid){
var aTag = $("a[name='"+ aid +"']");
$('html,body').animate({scrollTop: aTag.offset().top},'slow');
}
scrollToAnchor('id3');
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