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

HTML

How can i create a transition when linking to a element?

Look at the example i made:

http://jsfiddle.net/k5vr7/

You see transition from anchor to blue happen in an instant, how can i make a nice transition so it doesn't move that fast????

1 Answer

You'll need to add some sort of animation, rather than using the default anchor functionality. Check out this code snippet: http://css-tricks.com/snippets/jquery/smooth-scrolling/, or just do a Google search for "jquery animate to anchor". I imagine this could be done without jQuery as well, if you aren't already using jQuery in your project.

holy sh*t, that works! thanks