lundi 3 février 2020

How to save cookies for Dark/Light Mode Toggle?

I am using the W3Scholls Dark Mode Toggle for my webiste and it's working perfectly well.

But just after I refresh my page the default view that is Day Mode is shown.

This is Webpage Test Page.

How can I set cookies so that if a user selects dark mode then the page opens in dark mode by default?

Also, How can this be applied for the whole website so that the user need not press the button every time he opens the page.

Thanks




Aucun commentaire:

Enregistrer un commentaire