Answer the question
In order to leave comments, you need to log in
How to save cookies?
There is a pop-up window that is constantly loaded when you open the page, you need to select a city in it
. How can I make the city that you selected from the pop-up window save in a cookie, and this window will not pop up again?
we have the following popup code:
<div class="container">
<div id="categories_list">
<a href="#" id="current_cat">Выбрать город ˅</a>
<div id="categories_modal" style="display: none;">
<div class="modal_title">
<h5>Выберите ваш город</h5>
<a href="#" class="close_btn">X</a>
</div>
<div class="modal_content">
<ul class="row">
<?php foreach($result["rows"] as $row) { ?>
<?php if ($row["name"]) { ?>
<li class="col-md-6 col-xs-12"><a href="#cat<?php echo $row["id"]; ?>"><?php echo $row["name"]; ?></a></li>
<?php } ?>
<?php } ?>
</ul>
</div>
</div>
</div>
</div>
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question