Hello all,
I have a top-level page with 3 multi-state boxes which are collapsed on view.
I have also added anchors points as sub menus that I would like to link to the relevant open state of the multi-state box.
I am new to Wix and coding but thought I would be able to do so with the ‘viewportEnter’ function?
This is the code for one of the boxes:
$w.onReady(function FeesprivateStatebox() {
// TODO: write your page related code here...
$w("#closedButton2").onClick(() => {
$w("#FeesprivateStatebox").changeState("pvopenState");
});
$w("#openButton2").onClick(() => {
$w("#FeesprivateStatebox").changeState("pvclosedState");
});
});
Thought that this might be the code for one of the sub-menu anchor point:
export function anchor2_viewportEnter(event) {
// Add your code for this event here:
$w.onReady(function FeesprivateStatebox() {
$w("#FeesprivateStatebox").changeState("pvopenState");
});
}
Any advice would be greatly appreciated.
Thanks.