chill_hugoplate/assets/js/main.js

37 lines
787 B
JavaScript
Raw Normal View History

2023-05-25 10:41:54 +00:00
// main script
(function () {
"use strict";
2023-08-29 03:58:00 +00:00
// Dropdown Menu Toggler For Mobile
// ----------------------------------------
const dropdownMenuToggler = document.querySelectorAll(
".nav-dropdown > .nav-link",
);
dropdownMenuToggler.forEach((toggler) => {
toggler?.addEventListener("click", (e) => {
e.target.parentElement.classList.toggle("active");
});
});
// Testimonial Slider
// ----------------------------------------
2023-05-25 10:41:54 +00:00
new Swiper(".testimonial-slider", {
spaceBetween: 24,
loop: true,
pagination: {
el: ".testimonial-slider-pagination",
type: "bullets",
clickable: true,
},
breakpoints: {
768: {
slidesPerView: 2,
},
992: {
slidesPerView: 3,
},
},
});
})();