Sfoglia il codice sorgente

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

George Cushen 5 anni fa
parent
commit
be8cae3a1f
1 ha cambiato i file con 1 aggiunte e 1 eliminazioni
  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;