title: How can I use Velocity.js to smooth scroll to an element?
body: <p>I have a button (in my case an anchor tag styled as a button) that I am using jQuery to listen for a click event. </p>
  
  <p>When I click the button, how can I smooth-scroll to the target?</p>
  
  <p>Here is what I have so far:</p>
  
  <pre><code>$('a[href*="#"]').on('click', function (event) {
      event.preventDefault();
  
      let position = $($(this).attr("href")).offset().top;
  
      $('body').velocity('scroll', {
          duration: 3000
      });
  });
  </code></pre>
  
  <p>Thank you for any suggestions!</p>