I created a site last year on Wix. In my rush, I stupidly did not look how it looked on other mobile devices other than the smartphone. So now, one year later, I have a site that is clipped on almost all smart pads namely the iPad. Instead of reworking the entire site as the client likes the way it looks, my thinking is that I can do a mobile redirect so there are essentially two different sites. I created a duplicate site and a mobile site and published both for testing. The problem is it is not working. The I found is as follows:
import wixLocation from ‘wix-location’;
import wixWindow from ‘wix-window’;
$w.onReady( function () {
setTimeout( function () {
if (wixWindow.formFactor === “Mobile”){
wixLocation.to(‘http://www.myMobileHome.com’);
}
}, 7500);
});
I placed it into the masterpage.js. When that did not work, I tried the Home page. What a I doing wrong?