Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

General Discussion

Link to section within page

Hey Guys,

I understand the concept of linking an anchor tag to another section on the same page with the (#example) code, but idk how semantic that is. Is there a better way?

Also, when you click on such anchor tag it just quickly sends you to that place (ID) in the page without a subtle and nice transition. Does anyone know of good open source code to make that transition swiftly??

thank you in advance for your help!


5 Answers

Like the website http://simplemodal.plasm.it/#home

if you were to click on overview or examples or any of the other nav elements it subtly slides down to that part of the page.

Richard Lewis
Richard Lewis
5,101 Points

you could use jquery to achieve this (scrollTo) as an example, a css transition maybe?

Matt Campbell
Matt Campbell
9,767 Points

It's gotta be jQuery.

You can link the anchor you click on with the JQuery selector and then send it to the area of the site you want to go to with a slide transition set to slow or something.

thanks for the help guys! much appreciated