menu: Don't scroll to top when clicking info
This commit is contained in:
parent
a0c879948d
commit
16632706e0
|
@ -313,3 +313,15 @@ ready(() => {
|
|||
});
|
||||
}
|
||||
});
|
||||
|
||||
/**
|
||||
* Prevent scrolling on # links in menu
|
||||
*/
|
||||
ready(() => {
|
||||
const elements = document.querySelectorAll('.navbar a[href="#"]');
|
||||
elements.forEach((a) => {
|
||||
a.addEventListener('click', (e) => {
|
||||
e.preventDefault();
|
||||
});
|
||||
});
|
||||
});
|
||||
|
|
Loading…
Reference in New Issue