оцените плиз
teaser.zоne
push.dirеct
Взгляните в сторону cloudflare.com. На большинстве проектов использую, бесплатно и удобно.
Как то так:
$arrayOne = array( array('year' => 2018, 'value' => 100,), array('year' => 2019, 'value' => 200,), array('year' => 2020, 'value' => 300,), array('year' => 2021, 'value' => 400,), ); $arrayTwo = array(); foreach($arrayOne as $value){ $arrayTwo[$value['year']] = $value['value']; } var_dump($arrayTwo);
Вот это
<script type="text/javascript"> var delay_popup = 5000; setTimeout("document.getElementById('overlay').style.display='block'", delay_popup); </script>
надо заменить на это
<script type="text/javascript"> if(!localStorage.getItem('todos')) { var delay_popup = 5000; setTimeout("document.getElementById('overlay').style.display='block'", delay_popup); } </script>
как верно предложил flacon2000
вот такой код поставить надо:
$('.modal_social .modal_social_content2 .close').click(function(){ $('.modal_social').fadeOut(500); $('#overlay').fadeOut(500); }); $('.modal_social .uscl-public_popup-not-show').click(function(){ $('.modal_social').fadeOut(500); $('#overlay').fadeOut(500); $(this).addClass('not_open'); var todos = $('.modal_social').html(); localStorage.setItem('todos', todos); return false; });
код замени на
$(document).scroll(function(){ var topElement = $('.test').offset().top; if($(window).scrollTop() >= topElement && $(window).scrollTop() <= topElement + 100){ if($('.modal_social .uscl-public_popup-not-show').hasClass('not_open')){ return; } else{$('.modal_social').fadeIn(1000);} } }); $('.modal_social .modal_social_content2 .close').click(function(){ $('.modal_social').fadeOut(500); }); $('.modal_social .uscl-public_popup-not-show').click(function(){ $('.modal_social').fadeOut(500); $(this).addClass('not_open'); var todos = $('.modal_social').html(); localStorage.setItem('todos', todos); return false; });
хотя вероятней всего это тоже было с другого сайта копипастнуто?
Вот такие там ошибки вижу:
Uncaught ReferenceError: jQuery is not defined
Uncaught ReferenceError: $ is not defined
попробуй вместо вот этого кода:
<script src="https://fantany.ru/assets/libs/jquery-migrate-3.0.0.min.js"></script>
поставить вот этот
<script src="https://code.jquery.com/jquery-3.4.1.min.js" integrity="sha256-CSXorXvZcTkaix6Yvo6HppcZGetbYMGWSFlBw8HfCJo=" crossorigin="anonymous"></script>
Код надо перенести в самый низ страницы, вот сюда вот примерно (1790 строка):
<script> $(document).ready(function () { }); </script>
смысл в том что jquery необходимый данному коду инициализируется как раз таки в подвале, а данный код отрабатывает раньше
смысл в том чтоб конструкция
<span class="quest">?</span> <div class="questdiv goroda" id="questdiv"></div> <div class="clickme" id="clickme"></div>
находилась в отдельном контейнере от другой подобной конструкции, т.е. в каждая в отдельном div
<div> <span class="quest">?</span> <div class="questdiv goroda" id="questdiv"></div> <div class="clickme" id="clickme"></div> </div> <div> <span class="quest">?</span> <div class="questdiv moscow" id="questdiv"></div> <div class="clickme" id="clickme"></div> </div>
Как мне видится самый оптимальный вариант это аренда моб проксика (или подключение через мобилу) и через selenium в докер контейнере простеньким python+javascript кодом парсим выдачу и пишем в файлик =)