Return to Snippet

Revision: 57596
at June 2, 2012 14:48 by thewickedchemist

Initial Code
$(function($) {
    $(".scroll a, .top-btn").click(function(event) {
            scrollTop: $(this.hash).offset().top
        }, 500);


<a href="#theContent">Scroll to content</a>

<div id="theContent">
   blah blah blah

Initial URL

Initial Description
Simply set the id in the content, and use a hash in the anchor to scroll to it.

Initial Title
Smooth Scrolling to Any ID

Initial Tags

Initial Language