Ok, so here is the effect I am attempting to emulate:
Notice how when a menu item is clicked on, the menu slides to the appropriate div. How can I do this with my menu? My website is at willowlake.github.io .
Thanks.
EDIT : Thanks guys! Don't waste any more of your time on this simpleton question, it has been answered in depth.
Use this
Tiny Scrolling is a small script dedicated to support the navigation between the internal links and their destinations. It replace that annoying and confusing jump from various part of a page with a smooth scroll of the page itself.
Take a look at this:
Add this to your script
and you will be able to get the effect.
$('#idOfYourMenuItem').click(function(){
$('html, body').animate({ scrollTop: $('#idOfYourDiv').offset().top });
});
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.