Multistate Function?

@russian-dima Hi, thanks for your response. I’ve actually been developing this further myself, and have been able to assign a multi-state box, to a slideshow - which is great, as I have been able to highlight the topic the user is on, upon click. However, when the user clicks on another topic, it does not revert the previous state, as it in fact continues to highlight both (please see attached). What do I need to write coding wise, to reverse the state of the previous text, so it goes back to black writing?

This is my current coding:

$w.onReady( function () {

$w( "#ReadMoreButton1" ).onClick(() => {     

$w( “#ReadMoreStateBox1” ).changeState( “expandedState” );
$w( ‘#ReadMoreStateBox1’ ).changeState( “expandedState1” );
$w( ‘#slideshow1’ ).changeSlide( 0 );
});
$w( “#ReadMoreButton2” ).onClick(() => {
$w( “#ReadMoreStateBox2” ).changeState( “expandedState2” );
$w( ‘#ReadMoreStateBox2’ ).changeState( “expandedState2” );
$w( ‘#slideshow1’ ).changeSlide( 1 );
});
});

Hope this is clear enough