Skip to content

Commit 207993b

Browse files
committed
feat: Add toc scroll
1 parent a7f7792 commit 207993b

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

resources/js/functions.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -282,6 +282,10 @@ $(document).ready(function() {
282282
autoId: true,
283283
numerate: false
284284
});
285+
const target = $('#sidebar-toc .active');
286+
if (target.length) {
287+
$('#sidebar-toc').scrollTop(target.offset().top);
288+
};
285289
}
286290
});
287291

0 commit comments

Comments
 (0)