heres wix code
on mouse on > box changes color to red > and the text inside of box to blue…
on mouse out > changes box color to blue and the text inside of box to red.
(suggest changing color of “blue”
$w('#box1').style.backgroundColor = "blue"
to #box1 default #00000 color
so it dosnt look like a christmas tree
full code:
$w.onReady(function () {
});
export function box1_mouseIn(event) {
$w('#box1').style.backgroundColor = "red"
$w("#text1").html = `<h1 style = "color:blue"> ${$w("#text1").text}</h1>`;
}
export function box1_mouseOut(event) {
$w('#box1').style.backgroundColor = "blue"
$w("#text1").html = `<h1 style = "color:red"> ${$w("#text1").text}</h1>`;
}
PS…
dont forget to add event for #box1 and #text1 under properties panel