Hi,
Can you please send us the site URL and the name of the page to which the code was added? Moreover, have you checked the value of $w(’#switch1').checked ? I would make sure that it gets the correct value using console log.
Hi Tal,
Thanks for your response.
Site url: www.moneyplanned.com
Page: www.moneyplanned.com/add-goal-vehicle (Requires login)
I have currently disabled the code since it was not working, but I can enable it again if required.
Also, Im not sure about the console log you are talking about.
if ($w(’ #switch1 ‘).checked ){
$w(’ #box1 ').expand();
console.log(‘test’);
}
I have included a console.log here but there is no output. So im not sure if that condition is being verified.
Should I share the editor link?
Thanks
Hi,
I checked the documentation and there’s no an onChange event for a switch toggle . I think that you can use the onClick event instead and check whether the switch toggle is checked or not.