I am using queryParams to navigate to a specific place in another page of my site and the expand a collapsed item. My wixLocation.to part of the code works as expected, but I cannot manage the expand the collapsed item. Any suggestion would be welcome.
My code in page 1:
export function yearend_click(event) {
let value = "yearend";
wixLocation.queryParams.add(
{"key": value}
);
console.log(wixLocation.query);
}
Page 2 code:
$w.onReady( () => {
if(wixLocation.query.param === "yearend")
{
$w("#box93").expand();
wixLocation.to("/accounting#yearend");
}
});