I have this small amount of code that works (almost, the hyperlink doesn’t work), and it works for one #text17 box. However, I need this code to work on 10 different #text boxes, with 10 different Hyperlinks.
Here is my current code if someone can help a Wix Code Noob out. Thanks
$w.onReady( function () {
//removing the underline when the page is ready
removeUnderline();
//removing the underline when not hovering the text
$w(‘#text17’).onMouseOut(() => { removeUnderline(); });
//adding the underline when hovering the text
$w(‘#text17’).onMouseIn(() => { addUnderline(); });
});
function removeUnderline() {
let oldHtmlStr = $w(‘#text17’).html;
let newHtmlStr = oldHtmlStr.replace(/underline/i, ‘none’);
$w(‘#text17’).html = newHtmlStr;
}
function addUnderline() {
let oldHtmlStr = $w(‘#text17’).html;
let newHtmlStr = oldHtmlStr.replace(/none/i, ‘underline’);
$w(‘#text17’).html = newHtmlStr;
}