mirror of
https://github.com/McShelby/hugo-theme-relearn.git
synced 2024-11-30 03:03:09 +00:00
menu: bring active item in sight for large menus #149
This commit is contained in:
parent
5c306f0327
commit
4ca21ef1bb
1 changed files with 1 additions and 1 deletions
|
@ -113,7 +113,7 @@ function initMermaid() {
|
||||||
|
|
||||||
function scrollToActiveMenu() {
|
function scrollToActiveMenu() {
|
||||||
window.setTimeout(function(){
|
window.setTimeout(function(){
|
||||||
var e = $("#sidebar ul.topics li.active")[0];
|
var e = $("#sidebar ul.topics li.active a")[0];
|
||||||
if( e && e.scrollIntoView ){
|
if( e && e.scrollIntoView ){
|
||||||
e.scrollIntoView({
|
e.scrollIntoView({
|
||||||
block: 'center',
|
block: 'center',
|
||||||
|
|
Loading…
Reference in a new issue