Answer the question
In order to leave comments, you need to log in
Opening and closing blocks with remembering cookies (cookies)?
TELL ME How to do it?
Initially there is a hidden div block
<div class="col" id="box1" style="display: none">
содержимое
</div>
<a id="url1" href="#" >ССЫЛКА</a>
Answer the question
In order to leave comments, you need to log in
JS function that will add CookieName with value value to cookies :
<script>
function setCookie(){
days=7;
myDate = new Date();
myDate.setTime(myDate.getTime()+(days*24*60*60*1000));
document.cookie = 'CookieName=value; expires=' + myDate.toGMTString();
}
</script>
<a id="url1" href="#" onclick='setCookie()'>ССЫЛКА</a>
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question