Function used to work on Bootstrap Studio, now it doesnt?

function hoverartist(element) {
  element.setAttribute('src', 'assets/img/Hover%20Headings/ha.png');

  var wrapper = document.createElement('a');
  wrapper.setAttribute("href", "artists.html");
  element.parentNode.insertBefore(wrapper, element);
  wrapper.appendChild(element);
}

function unhoverartist(element) {
  element.setAttribute('src', 'assets/img/Headings/artists.png');
  
  var wrapper = document.querySelector('a');
  var parent = wrapper.parentNode;

  while (wrapper.firstChild) parent.insertBefore(wrapper.firstChild, wrapper);

  parent.removeChild(wrapper);
}

Hello so ive tried to use this in a website on this hosting site. But it doesnt work? when I preview it in bootstrap studio (which i exported to use on here) it worked perfectly now it doesnt? can anyone help? would appreciate it

if you people need anything please let me know thank you :slight_smile:

site url :slight_smile:

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.