Explorar el Código

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

George Cushen hace 5 años
padre
commit
be8cae3a1f
Se han modificado 1 ficheros con 1 adiciones y 1 borrados
  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;