top of page
Utility
Tools
Wix SDK Code - Open a Link in New Tab When A Container is Clicked
Image Showing how to use Wix SDK to add a link to a container

Open a URL in new tab when website visitors clicks a container. It uses Wix Location API
Code
import { location } from '@wix/site-location';
$w('#container').onClick(() => {
location.to("https://example.com");
});
Replace the container ID and link in the code
bottom of page