Return to Snippet

Revision: 72348
at July 27, 2017 03:19 by mishified


Initial Code
<script>
  lp.jQuery(function($) {
  
    // The speed of the scroll in milliseconds
    var speed = 1000;
  
    // Find links that are #anchors and scroll to them
    $('a[href^=#]')
      .not('.lp-pom-form .lp-pom-button')
      .unbind('click.smoothScroll')
      .bind('click.smoothScroll', function(event) {
        event.preventDefault();
        $('html, body').animate({ scrollTop: $( $(this).attr('href') ).offset().top }, speed);
      });
  });
</script>

Initial URL

                                

Initial Description
Place into before body end tag

Initial Title
Smooth Scrolling

Initial Tags

                                

Initial Language
JavaScript