Answer the question
In order to leave comments, you need to log in
How to hide div for non first visit of user?
There are two content divs:
<div id="first">Первый</div>
<div id="first">Второй</div>
Answer the question
In order to leave comments, you need to log in
We take the functions of getting and setting cookies from here .
window.onload = function(){
if(getCookie("block_visible")||setCookie("block_visible", 1, {expires:1e9})&&false){
document.querySelector(".block").style.display = "none";
}
}
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question