Question:
I want to use this script to make collapsed elements visible on my website.
Product:
Wix Editor
What are you trying to achieve:
I want to use this script to make collapsed elements visible on my website.
What have you already tried:
When I mark the elements as hidden, the script works fine
Additional information:
import wixData from 'wix-data';
//Meerdere betaalmiddelen
$w.onReady(function () {
const switchId = '#switch1';
const boxId = '#box4';
$w(switchId).onChange((event) => {
const switchValue = event.target.checked; // Hier halen we de boolean-waarde op
// Controleer de waarde van de switch en toon/verberg de box dienovereenkomstig
if (switchValue) { // Als switch aan staat (true)
$w(boxId).show();
} else { // Als switch uit staat (false)
$w(boxId).hide();
}
});
})
``
//Einde meerdere betaalmiddelen