Multi-State Box: Expand & Collapse Help

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

Here’s another view of the collapsedState that shows the properties.

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