Przeglądaj źródła

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

George Cushen 5 lat temu
rodzic
commit
be8cae3a1f
1 zmienionych plików z 1 dodań i 1 usunięć
  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.
    * --------------------------------------------------------------------------- */
 
-  $('#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.
     let hash = this.hash;