Error when making expandable boxes

Hi,

I am trying to create an expandable box using the tutorial found here…

When clicking on the button, I get following error in the console:
Uncaught (in promise) TypeError: $w(…).changeState is not a function

Here is the code I am using:

Help would be appreciated…

Kind regards

It appears you forgot to add the “.” before change state.

It should look like this:

$w("#readMoreStatebox").changeState("expandedState");

Rather than:

$w("#readMoreStatebox")changeState("expandedState");

Thank you…