Hello,
We have a problem with Wix’s code. we get into this domain - http://www.puremagics.com/ We have prepared a code that will switch between pages, in the editor it works well, but when publish its does not work.
It is in the benefit section - When you click on “heart,” it should lead to a text on a
“heart” on another page, but actually move to another page, and so on in all the icons.
This is the code:
page preview:
import {session} from ‘wix-storage’;
function GetItemIdSetSession (event) {
let item = event.target.id ;
session.setItem(‘item_key’,item);
}
page after:
import {session} from ‘wix-storage’;
var result = ‘’;
function GetDataFromHomePage(){
result = session.getItem(‘item_key’); //Where result will be a string.
console.log(result);
}
function ShowActiveTab(){
//HideBlueTabs();
if(!result){
$w(‘#hearttext’).show();
$w(‘#heartblue’).show();
$w(‘#hearttitleblue’).show();
$w(‘#heart’).hide();
$w(‘#hearttitle’).hide();
}else{
$w(‘#’+result+‘text’).show();
$w(‘#’+result+‘blue’).show();
$w(‘#’+result+‘titleblue’).show();
$w(‘#’+result+‘blue’).show();
$w(‘#’+result).hide();
$w(‘#’+result+‘title’).hide();
}
Does anyone know why this happens?
Thanks,
Reut