Dear community,
I’m trying to combine MouseIn with OnClick in wix Code. Here is what I’m trying to achieve.
There are 3 icon’s that the user is able to click on. When clicking on another icon it will change the text to the one of that part.
When I hover with my mouse over the third Icon, the edited icon shows up as if you are hovering over it. Exacly what should happen. However, then when I click on it, the edited Icon should stay, but it doesn’t.
Everything will change what need to change, except the edited picture, it will not stay and the “lighter icon” will take its place again.
Here are my codes:
$w.onReady( function () {
//TODO: write your page related code here…
});
export function b_click(event) {
//Add your code for this event here:
$w(‘#kandidaat’).hide()
$w(‘#match’).hide()
$w(‘#kandidaatbold’).hide()
$w(‘#Kandidatenanalysetekst’).hide()
$w(‘#Arrow2’).hide()
$w(‘#line13’).hide()
$w(‘#line12’).hide()
$w(‘#integralebold’).hide()
$w(‘#integralematchtekst’).hide()
$w(‘#arrow3’).hide()
$w(‘#lijn3’).hide()
$w(‘#lijn4’).hide()
$w(‘#functiebold’).show()
$w(‘#functieanalysetekst’).show()
$w(‘#arrow1’).show()
$w(‘#Lijn1’).show()
$w(‘#lijn2’).show()
$w(‘#functie’).show()
}
export function box2_click(event) {
//Add your code for this event here:
$w(‘#match’).hide()
$w(‘#functie’).hide()
$w(‘#functiebold’).hide()
$w(‘#functieanalysetekst’).hide()
$w(‘#arrow1’).hide()
$w(‘#Lijn1’).hide()
$w(‘#lijn2’).hide()
$w(‘#integralebold’).hide()
$w(‘#integralematchtekst’).hide()
$w(‘#arrow3’).hide()
$w(‘#lijn3’).hide()
$w(‘#lijn4’).hide()
$w(‘#kandidaatbold’).show()
$w(‘#Kandidatenanalysetekst’).show()
$w(‘#Arrow2’).show()
$w(‘#line13’).show()
$w(‘#line12’).show()
$w(‘#kandidaat’).show()
$w(‘#functie50’).show()
}
export function box3_click(event) {
//Add your code for this event here:
$w(‘#kandidaat’).hide()
$w(‘#functie’).hide()
$w(‘#functiebold’).hide()
$w(‘#functieanalysetekst’).hide()
$w(‘#arrow1’).hide()
$w(‘#Lijn1’).hide()
$w(‘#lijn2’).hide()
$w(‘#kandidaatbold’).hide()
$w(‘#Kandidatenanalysetekst’).hide()
$w(‘#Arrow2’).hide()
$w(‘#line13’).hide()
$w(‘#line12’).hide()
$w(‘#integralebold’).show()
$w(‘#integralematchtekst’).show()
$w(‘#arrow3’).show()
$w(‘#lijn3’).show()
$w(‘#lijn4’).show()
$w(‘#match’).show()
$w(‘#functie50’).show()
}
export function box3_mouseIn(event) {
//Add your code for this event here:
$w(‘#match’).show()
}
export function box3_mouseOut(event) {
//Add your code for this event here:
$w(‘#match’).hide()
}
export function box2_mouseIn(event) {
//Add your code for this event here:
$w(‘#kandidaat’).show()
}
export function box2_mouseOut(event) {
//Add your code for this event here:
$w(‘#kandidaat’).hide()
}
Thank you for your help, much appriciated!