Skip to main content

Enhance anchor tags with an animation. If javascript is disabled, the anchor tags will still work.

jQuery('a[href^="#"]').click(function (e) {
    e.preventDefault();
    var t = jQuery(jQuery(this).attr('href'));

    if (t.length > 0) {
        jQuery('html, body').animate({
            scrollTop: t.offset().top
        }, 'slow');
    }
});