Browse Source

feat: add optional .js-scroll class for smooth anchor scrolling

George Cushen 5 years ago
parent
commit
be8cae3a1f
1 changed files with 1 additions and 1 deletions
  1. 1 1
      assets/js/academic.js

+ 1 - 1
assets/js/academic.js

@@ -72,7 +72,7 @@
    * Add smooth scrolling to all links inside the main navbar.
    * Add smooth scrolling to all links inside the main navbar.
    * --------------------------------------------------------------------------- */
    * --------------------------------------------------------------------------- */
 
 
-  $('#navbar-main li.nav-item a.nav-link').on('click', function (event) {
+  $('#navbar-main li.nav-item a.nav-link, .js-scroll').on('click', function (event) {
     // Store requested URL hash.
     // Store requested URL hash.
     let hash = this.hash;
     let hash = this.hash;