Multistate Box Code

Please help. I’'m using a simple multistate box. The code worked earlier but now is not. I don’t know what happened. I’m trying to do a long list of these and it was going great until it wasn’t. Btw, dropped my laptop and had to go buy a new one today. Also, this is site is not yet live. Please be kind. I’m old and over my head. Many thanks.

$w . onReady ( function () {

$w ( “#button1” ). onClick (() => {
$w ( ‘#statebox8’ ). changeState ( “expanded8” );
});

$w ( “#button2” ). onClick (() => {
$w ( ‘#statebox8’ ). changeState ( “collapsed8” );
});

});

Including screenshots for to show code and names of states and buttons.

It all looks good to me from the screenshots. Is it still not working in either preview or live?

Thank you for replying. I just checked my preview and everything is working again. I spent hours yesterday–on my long series of boxes, not just the one box–trying to figure out what I had done to wreck the code and couldn’t find anything out of place. That, plus dropping my laptop, made for a stressful day. Now I’m wondering if this will be hit or miss when the website is live.