You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
cosmopet.ae/wp-content/themes/woodmart22/js/scripts/global/promoPopup.min.js

1 lines
1.4 KiB

!function(a){woodmartThemeModule.promoPopup=function(){var b=woodmart_settings.promo_version;if(!(woodmartThemeModule.$body.hasClass("page-template-maintenance")||"yes"!==woodmart_settings.enable_popup||"yes"===woodmart_settings.promo_popup_hide_mobile&&woodmartThemeModule.windowWidth<768||"confirmed"!==Cookies.get("woodmart_age_verify")&&"yes"===woodmart_settings.age_verify)){var c=!1,d=Cookies.get("woodmart_shown_pages"),e=function(){a.magnificPopup.open({items:{src:".wd-promo-popup"},type:"inline",removalDelay:500,tClose:woodmart_settings.close,tLoading:woodmart_settings.loading,callbacks:{beforeOpen:function(){this.st.mainClass="mfp-move-horizontal wd-promo-popup-wrapper"},close:function(){Cookies.set("woodmart_popup_"+b,"shown",{expires:7,path:"/"})}}}),woodmartThemeModule.$document.trigger("wood-images-loaded")};if(a(".woodmart-open-newsletter").on("click",function(a){a.preventDefault(),e()}),d||(d=0),d<woodmart_settings.popup_pages)return d++,Cookies.set("woodmart_shown_pages",d,{expires:7,path:"/"}),!1;"shown"!==Cookies.get("woodmart_popup_"+b)&&("scroll"===woodmart_settings.popup_event?woodmartThemeModule.$window.on("scroll",function(){if(c)return!1;woodmartThemeModule.$document.scrollTop()>=woodmart_settings.popup_scroll&&(e(),c=!0)}):setTimeout(function(){e()},woodmart_settings.popup_delay))}},a(document).ready(function(){woodmartThemeModule.promoPopup()})}(jQuery);