Return to Snippet

Revision: 53609
at November 29, 2011 14:02 by boton


Initial Code
$('a[href^="#"]').bind('click.smoothscroll',function (e) {
    e.preventDefault();

    var anchor = this.hash,
        $target = $(target);

    $('html, body').stop().animate({
        'scrollTop': $target.offset().top
    }, 500, 'swing', function () {
        window.location.hash = anchor;
    });

});

Initial URL
http://imakewebthings.github.com/jquery-waypoints/

Initial Description
Smooth scrolling for internal links

Initial Title
Smooth scrolling for internal links

Initial Tags

                                

Initial Language
jQuery