Markers

Sort and refine displayed items

Price
HKD
HKD
// Handles basket preview popup interactions and trusted seal popup link document.addEventListener("DOMContentLoaded", function () { const button = document.querySelector(".toggle-basket-preview.nav-link"); const popup = document.getElementById("customPopup"); const closeBtn = document.getElementById("closePopupBtn"); if (button && popup) { button.addEventListener("click", function (e) { e.preventDefault(); // Prevent default button behavior popup.style.display = "flex"; // Show the popup when button is clicked }); } if (closeBtn && popup) { closeBtn.addEventListener("click", function () { popup.style.display = "none"; // Hide the popup when "Got it" button is clicked }); } document.addEventListener("keydown", function (e) { if (e.key === "Escape" && popup) { popup.style.display = "none"; // Close the popup if Escape key is pressed } }); }); // Ensure the element with id "trusted_seal_link" exists before adding the event listener const yourLink = document.getElementById("trusted_seal_link"); if (yourLink) { yourLink.addEventListener('click', function (event) { event.preventDefault(); // Open the URL in a new window, ensuring security best practices with 'noopener noreferrer' window.open('https://www.etrust.pro/info/844.html', 'view', 'height=610,width=430,resizable=no,toolbar=no,location=no,scrollbars=yes,status=no'); }); } // Handles the dismissible header banner and initializes the multi-item carousel $(document).ready(function () { // Check if the 'alerted_check' exists in localStorage const isAlerted = localStorage.getItem('alerted_check'); if (!isAlerted) { // Fade in the headerstrip-wrapper with a defined duration const fadeInDuration = 7000; $("div.headerstrip-wrapper").fadeIn(fadeInDuration); } // Handle dismissing banners using event delegation for better performance $(document).on('click', '.js-banner__dismiss', function () { $(this).parent().hide(); localStorage.setItem('alerted_check', 'yes'); }); // Carousel multi-item logic $('.carousel.carousel-multi-item.v-2 .carousel-item').each(function () { let next = $(this).next(); if (!next.length) { next = $(this).siblings(':first'); } next.children(':first-child').clone().appendTo($(this)); // Clone the next 3 items to ensure the carousel displays multiple items for (let i = 0; i < 3; i++) { next = next.next(); if (!next.length) { next = $(this).siblings(':first'); } next.children(':first-child').clone().appendTo($(this)); } }); // Brands slider logic const brandsSlider = $('.brands_slider'); if (brandsSlider.length) { brandsSlider.owlCarousel({ loop: true, autoplay: true, autoplayTimeout: 5000, nav: false, dots: false, autoWidth: true, items: 8, margin: 42 }); // Initialize previous and next buttons for brands slider, ensuring the elements exist const prevButton = $('.brands_prev'); const nextButton = $('.brands_next'); if (prevButton.length) { prevButton.on('click', function () { brandsSlider.trigger('prev.owl.carousel'); }); } if (nextButton.length) { nextButton.on('click', function () { brandsSlider.trigger('next.owl.carousel'); }); } } }); // hide announcement const banner = document.querySelector('.banner-announcement'); window.addEventListener('scroll', () => { if (window.scrollY > 0) { banner.style.display = 'none'; // hide when scrolling down } else { banner.style.display = 'block'; // show when at top } });