I have a welcome page (or landing page if you prefer) that appears first, with a short animated logo.
After that I want to automatically go to the main home page.
My logo takes 11.5 seconds to animate.
The code below, which was kindly suggested on another post by @salman-hammed , is almost right for my needs:
But rather than pointing desktop and mobile to different pages, I want to send them both to the same page, but mobile with no delay, and desktop with 11.5secs delay, so that desktop only waits and watches the animation.
This code makes the desktop version work great, but it also makes the mobile version site wait, which I’m trying to avoid.
I need to make the setTimeout function just apply to the desktop version.
Any suggestions would be very gratefully received!! Thank you!
import wixWindow from ‘wix-window’ ;
import wixLocation from ‘wix-location’ ;
$w . onReady (() => {
setTimeout (()=>{
if ( wixWindow . formFactor === ‘Mobile’ ){
wixLocation . to ( ‘https://www.littlewolf.co.uk/home’ )
} else {
wixLocation . to ( ‘https://www.littlewolf.co.uk/home’ )
}
} , 11500 )
})