How to do that would be at the entrance to the site, the panel was open?

Found in a network here such code
But nowhere can I find information on how to do that would have automatically opened when you first enter the site, please tell me?
June 14th 19 at 20:18
2 answers
June 14th 19 at 20:20
Add the classes: open, close.
Check cookies. If the cookies with name name he does not, then add the class open and write the cookie Name if the cookie is there, add close.
btn.onclick = function() {

document.cookie = "username=panel";

 if(cookie.get('username') == null) {



Tell me what my error is? - jordan_Flatley commented on June 14th 19 at 20:23
the fact is that I have this code document.getElementById('msg').style.display='none'; does not work even - jordan_Flatley commented on June 14th 19 at 20:26
Can you?

if(!cookie.get('username')) {
}; - hellen_Ripp commented on June 14th 19 at 20:29
I here somewhere read that on jsfiddle you can't test the cookies. a simple html page I have this code doesn't work because there is scss and how to run it, I don't know.. - jordan_Flatley commented on June 14th 19 at 20:32
June 14th 19 at 20:22
Or says , or use all the same, but with LocalStorage

Find more questions by tags jQueryCSS