$(document).ready(function loaded() { $('body').addClass('domloaded'); $('.QRk_u-40').html('© Copyright 2004 — 2021 «4PAPAS» LLC.
All Rights Reserved.
6+
'); $('body').removeClass('ovh'); $('.mst1').removeClass('mst1_vis'); $('.promo_active ._2Bnpq-40').val('PAPIZZA50'); $('.bt_enter_code').click(); }); //Smooth Scrolling Using Navigation Menu $('a[href*="#"]').on('click', function(e){ $('html,body').animate({ scrollTop: $($(this).attr('href')).offset().top - 1 },700); e.preventDefault(); }); $('.aKVby-40').hover(function(){ $(this).find('._1S_Sc-40').toggleClass('info_visible'); }); jQuery(function($){ $(document).click(function (e){ // событие клика по веб-документу var div = $("._1S_Sc-40 .info_visible, .aKVby-40"); // тут указываем ID элемента if (!div.is(e.target) // если клик был не по нашему блоку && div.has(e.target).length === 0) { // и не по его дочерним элементам div.removeClass('info_visible'); // скрываем его } }); }); $(document).ready(function() { var mySwiper = new Swiper('.swiper-container', { direction: 'horizontal', loop: true, pagination: { el: '.swiper-pagination', type: 'bullets', }, navigation: { nextEl: '.swiper-button-next', prevEl: '.swiper-button-prev', }, autoplay: { delay: 9000, }, paginationClickable: true, }) }); $(document).ready(function() { var $btns = $('.products-tabs__tab').click(function() { if (this.id == 'all_filter') { $('.mst .OCoeO-40').fadeIn(500); } else { var $el = $('.' + this.id).fadeIn(500); $('.mst .OCoeO-40').not($el).hide(); } $btns.removeClass('active_filter_button'); $(this).addClass('active_filter_button'); }) }); $('.sb1').click(function() { $('.vrl').addClass('hid'); }); $('.sws').click(function() { $('.smt').addClass('vis_flex'); $('body').addClass('ovhmob'); }); $(function(){ document.SityArr=[]; searchSity(); $("#inpunSearchSity").bind('keyup', searchSity); }); function searchSity(){ var strValForSearch=$("#inpunSearchSity").val().toLowerCase(); var tempArr=document.SityArr; var arrResult=[]; if (strValForSearch.length==0){ arrResult=tempArr; //$('.sl1').html('Москва и область'); //$('.sl2').removeClass('hid'); } else{ var lenStrSearch=strValForSearch.length; for (var i=0; i
'+arrResult[i].name+'
'); } } function mtl(){ setInterval(function(){ $('.mst1').removeClass('mst1_vis'); $('body').removeClass('ovh'); }, 2350); }; $('body').on('click','.city_name', function(){ var city_Val=$(this).find('.ctname').html(); $('.smt').removeClass('vis_flex'); $('body').removeClass('ovhmob'); $('.main_city').html(city_Val); $('.mst1').addClass('mst1_vis'); $('body').addClass('ovh'); mtl(); toLocalCity(); }); $('.mcc').click(function(){ $('.vrl').addClass('hid'); $('.smt').toggleClass('vis_flex'); $('body').toggleClass('ovhmob'); }); $('.bd').click(function(){ toLocalCity(); }); jQuery(function($){ $(document).click(function (e){ // событие клика по веб-документу var lov = $(".smt.vis_flex, .mcc, .sws"); // тут указываем ID элемента if (!lov.is(e.target) // если клик был не по нашему блоку && lov.has(e.target).length === 0) { // и не по его дочерним элементам lov.removeClass('vis_flex'); // скрываем его $('body').removeClass('ovhmob'); } }); }); //localstorage function toLocalCity() { var city = $('.main_city').html(); localStorage.setItem('city', city); } //sticky navbar // Make the navbar sticky as soon as it reaches the top of the viewport const stickyNavbar = () => { // Define the main UI components const navbar = document.querySelector('#navbar'); const banner = document.querySelector('#sldr'); const content = document.querySelector('#menu-items'); // Position values for the content section let pos = banner.getBoundingClientRect(); // Lock the navbar once it reaches the top of the viewport if (pos.bottom < 0) { $(navbar).addClass('sticky'); } if (pos.bottom > 0) { $(navbar).removeClass('sticky'); } } // Execute stickyNavbar function whenever the user scrolls vertically window.addEventListener("scroll", stickyNavbar); //custom tumbler $('.GTChE-40').click(function(){ $(this).siblings('.GTChE-40').removeClass('_2lMjP-40'); $(this).addClass('_2lMjP-40'); }); //custom sizes tumbler $('._1koWR-40 div:nth-child(2)').click(function(){ $(this).siblings('.sizebg').css('transform','translateX(0%)'); $(this).siblings('.sizeitem').removeClass('vGOho-40'); $(this).addClass('vGOho-40'); }); $('._1koWR-40 div:nth-child(3)').click(function(){ $(this).siblings('.sizebg').css('transform','translateX(100%)'); $(this).siblings('.sizeitem').removeClass('vGOho-40'); $(this).addClass('vGOho-40'); }); $('._1koWR-40 div:nth-child(4)').click(function(){ $(this).siblings('.sizebg').css('transform','translateX(200%)'); $(this).siblings('.sizeitem').removeClass('vGOho-40'); $(this).addClass('vGOho-40'); }); $('._1koWR-40 div:nth-child(5)').click(function(){ $(this).siblings('.sizebg').css('transform','translateX(300%)'); $(this).siblings('.sizeitem').removeClass('vGOho-40'); $(this).addClass('vGOho-40'); }); //cart buttons attributes function initButtonsAttrs() { //button parse product name $('.ProductCard__button').attr( 'data-sb-product-name', productName ); function productName( index, attributeValue ) { var pureNames = $(this).parents('._9VPg6-40').find('._2G24_-40').html(); var namesWithoutLastSpaces = pureNames.trim(); return (namesWithoutLastSpaces); } //button parse product price $('.ProductCard__button').attr( 'data-sb-product-price', productPrice ); function productPrice( index, attributeValue ) { var stroke = $(this).parents('._9VPg6-40').find('._25gak-40').html(); var withoutSpaces = stroke.replace(/\s/g, ''); return (withoutSpaces); } //Size_button parse product sizes $('.sizeitem').attr( 'data-sb-curent-size', productCurentSize ); function productCurentSize( index, attributeValue ) { var curSizeStroke = $(this).html(); var curSizeName = $(this).parents('._9VPg6-40').find('._1koWR-40 div:nth-child(2)').text().replace(/[^ "a-zA-Z]/g,''); var curSizeStrokeWithoutSpaces = curSizeStroke.replace(/[^.\d]+/g,"").replace( /^([^\.]*\.)|\./g, 'AED1' ); var curSizeDigit = curSizeStrokeWithoutSpaces; var curSizeDigitStroke = String(curSizeDigit); var curSizeFull = (curSizeDigitStroke + curSizeName); return (curSizeFull); } //Size_button parse product prices //$('.sizeitem').attr( 'data-sb-curent-price', productCurentPrice ); //function productCurentPrice( index, attributeValue ) { // var minSizePrice = $(this).parents('.Card__footer').find('._25gak-40').html(); // //} //button parse product size $('.ProductCard__button').attr( 'data-sb-product-size', productSize ); function productSize( index, attributeValue ) { if(!$(this).parents('._9VPg6-40').find('._1koWR-40').length == 0) { return ($(this).parents('._9VPg6-40').find('._1koWR-40 div:nth-child(2)').html()); } } //button parse product image $('.ProductCard__button').attr( 'data-sb-product-img', productImg ); function productImg( index, attributeValue ) { //if attr centersrc contain whatever - var attri = $(this).parents('._9VPg6-40').find('._2ckYL-40 img').attr('centersrc'); if (typeof attri !== typeof undefined && attri !== false) { var relativeLink = $(this).parents('._9VPg6-40').find('._2ckYL-40 img').attr('centersrc'); return (relativeLink); } else { var relativeLink = $(this).parents('._9VPg6-40').find('._2ckYL-40 img').attr('src'); return (relativeLink); } } //button set product quantity $('.ProductCard__button').attr( 'data-sb-product-quantity', productQuantity ); function productQuantity( index, attributeValue ) { return ( '1' ); } //button set product id $('.ProductCard__button').attr( 'data-sb-id-or-vendor-code', productId ); function productId( index, attributeValue ) { return ( '00000' + (index+1) ); } //Size_button set product id //1st sizeitem must have id simmilar to button vendor id $('._1koWR-40').find('div:not(:nth-child(1)):not(:nth-child(2))').attr( 'data-sb-curent-id-or-vendor-code', productCurrentId ); function productCurrentId( index, attributeValue ) { return ( 'sz000s' + (index+1) ); } $('._1koWR-40').find('div:nth-child(2)').attr( 'data-sb-curent-id-or-vendor-code', productCurrentIdFirst ); function productCurrentIdFirst( index, attributeValue ) { var productCurrentIdFirstItem = $(this).parents('.Card__footer').find('.ProductCard__button').attr('data-sb-id-or-vendor-code'); return (productCurrentIdFirstItem); } } initButtonsAttrs(); $('._11QpV-40').click(function(){ $('.SEOText').addClass('_2PMo3-40'); $(this).hide(); $('.mtrack').attr('style', 'height: auto; overflow: visible;') }); //cart scroll to bottom //$(document).ready(function bottomScroll() { // var container = $('.OWVMj-40'); // container[0].scrollTop = container[0].scrollHeight; //}; $(document).ready(function(){ function scrltp1(){ var basketHeight1 = $('.smart-basket__form').height(); var wrapperHeight1 = $('.smart-basket__wrapper').height(); if (basketHeight1 > wrapperHeight1){ $('#blockscroll').addClass('ts1'); $('#blockscroll').animate({ scrollTop: $(".smart-basket__result-common").offset().top }, 900); } else { $('#blockscroll').removeClass('ts1'); } } scrltp1(); }); $('.more_info').click(function() { $(this).toggleClass('questions__item_opened').siblings('._1FiPi-40').toggleClass('openeditem'); }); $('.bDwev-40').click(function(){ $('.click_platform').click(); }); $('.QRk_u-40').html('© Copyright 2004 — 2021 «4PAPAS» LLC.
All Rights Reserved.
6+
');