]> BookStack Code Mirror - bookstack/blobdiff - resources/assets/js/global.js
Add Slovak translation
[bookstack] / resources / assets / js / global.js
index 94462ed6483de9ba64f2035c33facd642dda5308..650919f85e7c243837c02cafce0827bece3fa0ea 100644 (file)
@@ -61,10 +61,9 @@ Controllers(ngApp, window.Events);
 // Smooth scrolling
 jQuery.fn.smoothScrollTo = function () {
     if (this.length === 0) return;
-    let scrollElem = document.documentElement.scrollTop === 0 ?  document.body : document.documentElement;
-    $(scrollElem).animate({
+    $('html, body').animate({
         scrollTop: this.offset().top - 60 // Adjust to change final scroll position top margin
-    }, 800); // Adjust to change animations speed (ms)
+    }, 300); // Adjust to change animations speed (ms)
     return this;
 };