
It still does not accept the element, or how is the correct way for the button event to be clicked to eliminate the hide () text?
page - A
import {local} from 'wix-storage';
.
.
.
let data = JSON.stringify({
element: "text170",
command: "show",
});
local.setItem("key1", data);
page - B
import {local} from 'wix-storage';
import wixLocation from 'wix-location';
let data = JSON.parse(local.getItem("key1")); console.log(data);
$w.onReady(()=>{
let data = {
element: "text170",
command: "hide",
};
console.log($w(`#${data.element}`));
console.log(data.command);
$w(`#${data.element}`)[data.command]();
});
export function columnStrip1_click(event) {
wixLocation.to("/plogin")
$w("#text170").hide()
}
What is the right way ?