Answer the question
In order to leave comments, you need to log in
js cookies don't work to show message 1 time?
Good evening, the library is connected
https://cdn.jsdelivr.net/npm/[email protected]/src/js.cookie.min.js
function diplay_hide (blockId)
{
if(!Cookies.get("checker")) {
Cookies.set('checker', 'value', { expires: 30 });
$(blockId).animate({height: 'show'}, 500);
} else {
$(blockId).animate({height: 'hide'}, 500);
}
}
<div class="personal-data" id="block_id"><div class="personal-data-warning">ТЕКСТ<a class="close" onclick="diplay_hide('#block_id');return false;" id="setCookie" ></a></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