Hello!
When a user clicks anywhere on the table, I would like them to be directed to an external link. I’ve tried to learn the handlers but not even sure if I’m on the correct trajectory. Here’s what I have thus far (used wix.com for placeholder):
Hello!
When a user clicks anywhere on the table, I would like them to be directed to an external link. I’ve tried to learn the handlers but not even sure if I’m on the correct trajectory. Here’s what I have thus far (used wix.com for placeholder):
Use location and I believe the external pages will open in new window by default.
Hey Josh,
Couple of things to add to Andreas’ answer.
export function table1_onClick(event) {
wixLocation.to("http://externalSite.com");
}
$w.onReady(function () {
$w("#table1").onClick((event) => {
wixLocation.to("http://externalSite.com");
});
});
import wixLocation from 'wix-location';
BTW- I noticed that adding the click event to the table doesn’t change the pointer to a pointing hand in the published site. Meaning your site visitors won’t have an indication that the table is click-able. I’ve already reported this as a bug.