Collapsible Text

In Classic Editor, collapsible text’s ‘Read Less’ link is sending the user to the bottom of the next section on the site instead of back to the text.

Screencast if needed - https://www.loom.com/share/d727d2aedc7e406ea65dfd45dcd95118?sid=d8b9ef5a-7b61-42c3-af2a-6c8ecc5fe6c1 .

I have tried I used previously on another site and it works except for the ‘Read Less’ button…the code I am trying is…

$w.onReady(function () {
$w(“#buttonadcock”).onClick((event) => {
$w(“#statebox8”).changeState(“Adcock”);
$w(“#statebox8”).expand()
$w(“#buttonadcock”).hide()
$w(“#closeadcock”).show()
});
$w(“#buttonturpin”).onClick((event) => {
$w(“#statebox8”).changeState(“Turpin”);
$w(“#statebox8”).expand()
$w(“#buttonturpin”).hide()
$w(“#closeturpin”).show()
});
$w(“#buttonzimmer”).onClick((event) => {
$w(“#statebox8”).changeState(“Zimmer”);
$w(“#statebox8”).expand()
$w(“#buttonzimmer”).hide()
$w(“#closezimmer”).show()
});
$w(“#closeadcock, #closeturpin, #closezimmer”).onClick((event) => {
$w(“#statebox8”).collapse()
$w(“#buttonadcock”).show()
$w(“#buttonturpin”).show()
$w(“#buttonzimmer”).show()
$w(“#closeadcock”).hide()
$w(“#closeturpin”).hide()
$w(“#closezimmer”).hide()
});
$w(“#buttonskelton”).onClick((event) => {
$w(“#statebox9”).changeState(“Skelton”);
$w(“#statebox9”).expand()
$w(“#buttonskelton”).hide()
$w(“#closeskelton”).show()
});
$w(“#buttonkturpin”).onClick((event) => {
$w(“#statebox9”).changeState(“KTurpin”);
$w(“#statebox9”).expand()
$w(“#buttonkturpin”).hide()
$w(“#closekturpin”).show()
});
$w(“#buttonpate”).onClick((event) => {
$w(“#statebox9”).changeState(“Pate”);
$w(“#statebox9”).expand()
$w(“#buttonpate”).hide()
$w(“#closepate”).show()
});
$w(“#buttonrodriguez”).onClick((event) => {
$w(“#statebox9”).changeState(“Rodriguez”);
$w(“#statebox9”).expand()
$w(“#buttonrodriguez”).hide()
$w(“#closerodriguez”).show()
});
$w(“#closeskelton, #closekturpin, #closepate, #closerodriguez”).onClick((event) => {
$w(“#statebox9”).collapse()
$w(“#buttonskelton”).show()
$w(“#buttonkturpin”).show()
$w(“#buttonpate”).show()
$w(“#buttonrodriguez”).show()
$w(“#closeskelton”).hide()
$w(“#closekturpin”).hide()
$w(“#closepate”).hide()
$w(“#closerodriguez”).hide()

}); 

});

Any ideas? Thanks.