@jonatandor35 Thanks for your response well I’ve changed some changes in the code please see the code:
$w . onReady ( function () {
$w ( ‘#darkModeSwitch’ ). onChange ( function () {
if ( $w ( ‘#darkModeSwitch’ ). checked ) {
$w ( ‘#emailIcon’ ). src = ‘https://static.wixstatic.com/media/d04120_2cd897ba7a2246a396bfa8a23dad40ef~mv2.png’ ; //light icon
} else {
//…
$w ( ‘#emailIcon’ ). src = ‘https://static.wixstatic.com/media/d04120_a2f9e9ccd89744d5af2cd1e4bb652e6b~mv2.jpg’ ; //dark icon
}
$w ( ‘Document’ ). background . src = “https://static.wixstatic.com/media/d04120_7c42b975c694470ba8a77195178acfd8~mv2.png” , $w ( ‘#darkModeState’ ). text = “Dark Mode On”
} else {
$w ( ‘Document’ ). background . src = “https://static.wixstatic.com/media/d04120_2636c2ad09774cd597ccfb1e9f929e25~mv2.png” , $w ( ‘#darkModeState’ ). text = “Dark Mode Off” }
});
});
But unfortunately it doesn’t work and even can’t change the background color!