fediversity.eu/themes/hugoplate/assets/js/main.js

37 lines
794 B
JavaScript
Raw Normal View History

2024-03-26 16:28:28 +01:00
// main script
(function () {
"use strict";
// Dropdown Menu Toggler For Mobile
// ----------------------------------------
const dropdownMenuToggler = document.querySelectorAll(
".nav-dropdown > .nav-link",
);
dropdownMenuToggler.forEach((toggler) => {
toggler?.addEventListener("click", (e) => {
2024-03-27 12:24:18 +01:00
e.target.closest(".nav-item").classList.toggle("active");
2024-03-26 16:28:28 +01:00
});
});
// Testimonial Slider
// ----------------------------------------
new Swiper(".testimonial-slider", {
spaceBetween: 24,
loop: true,
pagination: {
el: ".testimonial-slider-pagination",
type: "bullets",
clickable: true,
},
breakpoints: {
768: {
slidesPerView: 2,
},
992: {
slidesPerView: 3,
},
},
});
})();