Commit 2c5eaef605e33e10ac57deb52016248ff0feb4f4
1 parent
c8c0a20b
popup hide by cookie 1h
Showing
1 changed file
with
15 additions
and
1 deletions
Show diff stats
src/app/frontend/views/index.php
@@ -267,8 +267,22 @@ $page_title = isset( $page_title ) && !empty( $page_title ) ? $page_title : ''; | @@ -267,8 +267,22 @@ $page_title = isset( $page_title ) && !empty( $page_title ) ? $page_title : ''; | ||
267 | </div> | 267 | </div> |
268 | 268 | ||
269 | <script> | 269 | <script> |
270 | + | ||
270 | $(document).ready(function(){ | 271 | $(document).ready(function(){ |
271 | - setTimeout(function(){$(".open-delivery-modal").show();},1000); | 272 | + function getCookie(a) { |
273 | + var b = new RegExp(a+'=([^;]){1,}'); | ||
274 | + var c = b.exec(document.cookie); | ||
275 | + if(c) c = c[0].split('='); | ||
276 | + else return false; | ||
277 | + return c[1] ? c[1] : false; | ||
278 | + } | ||
279 | + var cookie = getCookie('popup'); | ||
280 | + if (cookie !== '1') { | ||
281 | + setTimeout(function(){$(".open-delivery-modal").show();},1000); | ||
282 | + } | ||
283 | + else { | ||
284 | + $(".open-delivery-modal").hide(); | ||
285 | + } | ||
272 | }); | 286 | }); |
273 | $(".open-delivery-modal div img").click(function(){ | 287 | $(".open-delivery-modal div img").click(function(){ |
274 | $(".delivery-form-par").show(); | 288 | $(".delivery-form-par").show(); |