sclark
September 21, 2020, 9:09pm
1
Hi there,
I’m trying to get this expandable and collapsible multi-state box to work. I followed the corvid instructions, and I can’t figure out why it won’t work.
Here’s the code I’m using:
$w.onReady( function () {
$w( “#readMoreButton ” ).onClick(() => {
$w( ‘#readMoreStatebox ’ ).changeState( “#readlessState ” );
});
$w( “#readLessButton ” ).onClick(() => {
$w( ‘#readMoreStatebox ’ ).changeState( “#collapsedState ” );
} );
});
Thank you!
Shannon
sclark
September 21, 2020, 9:11pm
2
Here’s another view of the collapsedState that shows the properties.
aepma
September 26, 2022, 2:49am
3
the state’s name shouldn’t have an hashtag preceding it. Just readlessState instead of #readlessState .
$w.onReady(function () {
$w("#readMoreButton").onClick(() => {
$w('#readMoreStatebox').changeState("readlessState");
});
$w("#readLessButton").onClick(() => {
$w('#readMoreStatebox').changeState("collapsedState");
});
});
Like already mentioned by —> Andre Macedo