mirror of
https://github.com/hyprwm/hyprland-website.git
synced 2024-12-23 02:39:48 +01:00
11 lines
No EOL
318 B
JavaScript
11 lines
No EOL
318 B
JavaScript
const links = document.querySelectorAll(".like-this");
|
|
|
|
|
|
links.forEach((link) => {
|
|
link.addEventListener("click", (event) => {
|
|
event.preventDefault();
|
|
const targetId = link.getAttribute("href");
|
|
const target = document.querySelector(targetId);
|
|
target.scrollIntoView({ behavior: "smooth" });
|
|
});
|
|
}); |