May 19, 2012

Jquery smooth scroll external anchor link

Question by user1405690

okay can you please help me with a peice of jquery code. Here is what i want to happen. My website is cyberfanatic.com right so. So for example lets just use the footer for now. i have a a tag with the id of footer right. so say if someone visits cyberfanatic.com/#footer right now the page will load and the then jump directly to the bottom of the page to where the anchor link with footer is. How can i get it so that when the page cyberfanatic.com#footer loads that the page loads and the smooth scrolls to the anchor with the id of footer. Please help me out.

Answer by Starx

Use the scrollTo() plugin function

$.scrollTo("#footerid");

Author: Nabin Nepal (Starx)

Hello, I am Nabin Nepal and you can call me Starx. This is my blog where write about my life and my involvements. I am a Software Developer, A Cyclist and a Realist. I hope you will find my blog interesting. Follow me on Google+

...

Please fill the form - I will response as fast as I can!