Answer the question
In order to leave comments, you need to log in
How to make a jQuery Cookie so it will be remembered?
Yesterday's question about Cookies led to the need to use them anyway.
https://jsfiddle.net/webirus/t95b0qt7/
Here's what I get.
When you click on the .link block, the color of the .block changes to black, adding a class.
When we first log in, we get Undefind, since the cookie is unknown to us.
Then the cookie is written, it can be seen if you click on the block and then do Run.
But how to make the block remain black even after reloading the page?
And when you go to other pages of the site?
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