hello,
i have multiple boxes at headers,
each show only if a page is open
i am using wixLocation to identify page, each box show for the correspondent page
code is placed at "site code"
however, it does not work :S
so can anybody assist me with this code
import wixLocation from 'wix-location';
$w.onReady(function () {
//TODO: write your page related code here...
let prefix= wixLocation.prefix;
if (prefix=== "page1"){$w('#box1').show;} else {$w('#box1').hide();}
if (prefix=== "page2"){$w('#box2').show;} else {$w('#box2').hide();}
if (prefix=== "page3"){$w('#box3').show;} else {$w('#box3').hide();}
});
it should be show() with parentheses.