Wix Tutorial - Automatically redirect to another page after a time delay, using Wix Code

This code lets you automatically redirect to another page after a short time delay.

Elements:

Elements:

  • Page redirected from /redirect

  • Page redirected to /automatically-redirect (this page)

Wix Code:

import wixLocation from 'wix-location';

 

$w.onReady(function () {

    setTimeout(() => {

        wixLocation.to("/automatically-redirect");

    }, 5000);

});

Websites designed by WixCreate that use the above Wix Code:

None