Return to Snippet

Revision: 8442
at September 22, 2008 17:08 by tclancy


Initial Code
$('a[href=#target]').
    click(function(){
        var target = $('a[name=target]');
        if (target.length)
        {
            var top = target.offset().top;
            $('html,body').animate({scrollTop: top}, 1000);
            return false;
        }
    });

Initial URL
http://stackoverflow.com/questions/68165/javascript-to-scroll-long-page-to-div

Initial Description

                                

Initial Title
jQuery Scroll Element

Initial Tags

                                

Initial Language
JavaScript