How to Add an Anchor Link

How to Add an Anchor Link
Written by Jonathan Diaz
Updated 3 years ago
Link: Use #(element_ID) removing the "()" and using whatever name you want, such as #select_117
Set Anchor Link: <a name="(select_117)"></a> removing the "()" and using the same name used in the link above (e.g. <a name="select_117"></a>.  Just be sure they match.
If you want the browser to smooth scroll slowly rather than jump, click on settings/custom script and paste the following:
<script>
$(document).ready(function(){
  // Add smooth scrolling to all links
  $("a").on('click', function(event) {
    // Make sure this.hash has a value before overriding default behavior
    if (this.hash !== "") {
      // Prevent default anchor click behavior
      event.preventDefault();
      // Store hash
      var hash = this.hash;
      // Using jQuery's animate() method to add smooth page scroll
      // The optional number (800) specifies the number of milliseconds it takes to scroll to the specified area
      $('html, body').animate({
        scrollTop: $(hash).offset().top
      }, 800, function(){
  
        // Add hash (#) to URL when done scrolling (default click behavior)
        window.location.hash = hash;
      });
    } // End if
  });
});
</script>
Please make sure to test all links on your page after adding this script to check they perform as you want.
Did this answer your question?