[Need Help] redirect when click on text

Hi i tried to use onclick event to redirect to a page in my website when clicking on text but it doesn’t work for me

export function text41_mouseOut(event) {
//Add your code for this event here:
let oldHtmlStr = $w(‘#text41’).html;
let newHtmlStr = $w(‘#text41’).html = “

Mot du Directeur Général


console.log(newHtmlStr);
$w(‘#text41’).html = newHtmlStr;
}

export function text41_mouseIn(event) {
//Add your code for this event here:
let oldHtmlStr = $w(‘#text41’).html;
let newHtmlStr = $w(‘#text41’).html = “

Mot du Directeur Général


console.log(newHtmlStr);
$w(‘#text41’).html = newHtmlStr;
}
import wixLocation from ‘wix-location’;
export function text41_onclick(event, $w) {
//Add your code for this event here:
wixLocation.to.to(“/evenements”);
}

no need for an onClick

$w(“#text41”).link = “http://wix.com”;

$w(“#text41”).link = “/evenements”;

Can you show me where i need to add that code

@fose

just place it after the onReady