Explorar o código

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

George Cushen %!s(int64=5) %!d(string=hai) anos
pai
achega
be8cae3a1f
Modificáronse 1 ficheiros con 1 adicións e 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;