Code to retain Website's "Dark Mode" after refreshing | SoloLearn: Learn to code for FREE!

0

Code to retain Website's "Dark Mode" after refreshing

I have a dark mode button on my website made using jQuery. When I refresh my website it losses its configuration and changes back to light mode automatically. Is there any code/script or something like cookies to fix it.

6/1/2020 6:43:30 AM

Mukesh Kaswan

1 Answer

New Answer

0

Use a cookie; lookup "document.cookie"