Add Lotusdocs theme
This commit is contained in:
15
themes/lotusdocs/assets/docs/js/scrollspy-script.js
Normal file
15
themes/lotusdocs/assets/docs/js/scrollspy-script.js
Normal file
@@ -0,0 +1,15 @@
|
||||
//ScrollSpy - via https://github.com/kimyvgy/simple-scrollspy
|
||||
window.onload = function () {
|
||||
scrollSpy('toc', {
|
||||
sectionClass: 'h1,h2,h3,h4',
|
||||
// menuActiveTarget: 'href',
|
||||
offset: 100,
|
||||
// scrollContainer: null,
|
||||
// smooth scroll
|
||||
// smoothScroll: true,
|
||||
// smoothScrollBehavior: function(element) {
|
||||
// console.log('run "smoothScrollBehavior"...', element)
|
||||
// element.scrollIntoView({ behavior: 'smooth' })
|
||||
// }
|
||||
})
|
||||
}
|
||||
Reference in New Issue
Block a user