//import module for opening link with .to in another tab
import wixLocation from ‘wix-location’ ;
var HasBeenClicked
//element html1 is connected to a box with a script for a hack for loading the pg in a new tab, also #AudienceMember1 is connected to the url output in that script
//-- all the rest of the elements follow the functions below
export function AudienceMember1_click ( event ) { $w ( ‘#html1’ ). postMessage ( ‘POSTMESSAGEARGUMENT’ );
let hideOptions = {
‘delay’ : 500 ,
‘duration’ : 1000
};
$w ( “#AudienceMember1” ). hide ( “fade,hideOptions” );
//Timer Function in milliseconds
setTimeout ( function () {
$w ( “#AudienceMember1” ). show ( “fade” );
}, 7200000 );
export function AudienceMember2_click ( event ) { $w ( ‘#html2’ ). postMessage ( ‘POSTMESSAGEARGUMENT’ );
let hideOptions = {
‘delay’ : 500 ,
‘duration’ : 1000
};
$w ( “#AudienceMember2” ). hide ( “fade,hideOptions” );
setTimeout ( function () {
$w ( “#AudienceMember2” ). show ( “fade” );
}, 7200000 );
}
export function AudienceMember3_click ( event ) { $w ( ‘#html3’ ). postMessage ( ‘POSTMESSAGEARGUMENT’ );
let hideOptions = {
‘delay’ : 500 ,
‘duration’ : 1000
};
$w ( “#AudienceMember3” ). hide ( “fade,hideOptions” );
setTimeout ( function () {
$w ( “#AudienceMember3” ). show ( “fade” );
}, 7200000 );
}
export function AudienceMember4_click ( event ) { $w ( ‘#html4’ ). postMessage ( ‘POSTMESSAGEARGUMENT’ );
let hideOptions = {
‘delay’ : 500 ,
‘duration’ : 1000
};
$w ( “#AudienceMember4” ). hide ( “fade,hideOptions” );
setTimeout ( function () {
$w ( “#AudienceMember4” ). show ( “fade” );
}, 7200000 );
}
export function AudienceMember5_click ( event ) { $w ( ‘#html5’ ). postMessage ( ‘POSTMESSAGEARGUMENT’ );
let hideOptions = {
‘delay’ : 500 ,
‘duration’ : 1000
};
$w ( “#AudienceMember5” ). hide ( “fade,hideOptions” );
setTimeout ( function () {
$w ( “#AudienceMember5” ). show ( “fade” );
}, 7200000 );
}
export function AudienceMember6_click ( event ) { $w ( ‘#html6’ ). postMessage ( ‘POSTMESSAGEARGUMENT’ );
let hideOptions = {
‘delay’ : 500 ,
‘duration’ : 1000
};
$w ( “#AudienceMember6” ). hide ( “fade,hideOptions” );
setTimeout ( function () {
$w ( “#AudienceMember6” ). show ( “fade” );
}, 7200000 );
}
export function AudienceMember7_click ( event ) { $w ( ‘#html7’ ). postMessage ( ‘POSTMESSAGEARGUMENT’ );
let hideOptions = {
‘delay’ : 500 ,
‘duration’ : 1000
};
$w ( “#AudienceMember7” ). hide ( “fade,hideOptions” );
setTimeout ( function () {
$w ( “#AudienceMember7” ). show ( “fade” );
}, 7200000 );
}
export function AudienceMember8_click ( event ) { $w ( ‘#html8’ ). postMessage ( ‘POSTMESSAGEARGUMENT’ );
let hideOptions = {
‘delay’ : 500 ,
‘duration’ : 1000
};
$w ( “#AudienceMember8” ). hide ( “fade,hideOptions” );
setTimeout ( function () {
$w ( “#AudienceMember8” ). show ( “fade” );
}, 7200000 );
}
export function AudienceMember9_click ( event ) { $w ( ‘#html9’ ). postMessage ( ‘POSTMESSAGEARGUMENT’ );
let hideOptions = {
‘delay’ : 500 ,
‘duration’ : 1000
};
$w ( “#AudienceMember9” ). hide ( “fade,hideOptions” );
setTimeout ( function () {
$w ( “#AudienceMember9” ). show ( “fade” );
}, 7200000 );
}
export function AudienceMember10_click ( event ) { $w ( ‘#html10’ ). postMessage ( ‘POSTMESSAGEARGUMENT’ );
let hideOptions = {
‘delay’ : 500 ,
‘duration’ : 1000
};
$w ( “#AudienceMember10” ). hide ( “fade,hideOptions” );
setTimeout ( function () {
$w ( “#AudienceMember10” ). show ( “fade” );
}, 7200000 );
}
How to disable elements on refresh? When I refresh the page all of the elements reset to their original state. They do not stay hidden as the code is written, could someone help me iron this out and tone the code to a functional point?