Hi I’m quite new in here. I’m trying to pass info from one page to a new page through query.param and complete a function (expand a strip)
The code in my source page:
export function hoverBox24_click(event) {
//Add your code for this event here:
let s = "laser";
for (var key in wixLocation.query.param) {
s += key + "=" + wixLocation.query[key] + "&";
}
s = s.substring(0, s.length - 1);
wixLocation.to("/lavorazioni" + s);
}
The code in my landing page:
$w.onReady(function () {
console.log(wixLocation.query)
let query = wixLocation.query;
$w.onReady(() => {
if(query === 'laser'){
$w('#strip11').expand();}
});
});
The wixLocation.to function is working but the “strip11” is always displayed even if i’m landing on the page from the menu.