46th Js project - Darkmode with LocalStorage Source Code

Published: 31 July 2021
on channel: UI Monk
162
like

#1378 #javascriptproject

46th Javascript project - Darkmode with Localstorage Source Code
https://drive.google.com/file/d/1MHwM...

What to learn in this video
1. DarkMode
2. LocalStorage set and get

Steps to be Followed
1. Design HTML page to display darkmode
2. create CSS variable for switching to dark mode and light mode
3. javascript for on clicking checkbox add function dark mode
1. get the checkbox
2. add change event on the checkbox to toggle between dark and light
3. with the passed event, check if the checkbox is checked
4. use documentElement to change a global variable
5. use localStorage to store the data on checkbox checked
6. on page load check any value available on localStorage
7. if available update the documentElement
8. if localStorage has dark theme then check the checkbox on page load

Complete weekly Javascript projects playlist
   • 45th Javascript Project - Open Tab us...  


Watch video 46th Js project - Darkmode with LocalStorage Source Code online without registration, duration hours minute second in high quality. This video was added by user UI Monk 31 July 2021, don't forget to share it with your friends and acquaintances, it has been viewed on our site 162 once and liked it like people.