Skip to content Skip to sidebar Skip to footer

Html Remove Destination From Link

When you hover over a link, a 'destination' pops up at the bottom of your browser. How do I remove this? I've spent hours googling it and can't find what the damn 'destination popu

Solution 1:

I don't believe that can actually be disabled, but you can hack around it if you must. You can remove the "href" property from the link and instead attach a click event listener to the element which changes the page. You could keep the href stored on the element itself by renaming it to something like data-href, to be proper. However, I wouldn't recommend doing this at all. Nonetheless, here you go:

Live demo (click).

<a data-href="some/place">No Status on this Link!</a>

JavaScript:

var anchors = document.querySelectorAll('a[data-href]');

for (var i=0; i<anchors.length; ++i) {
  var anchor = anchors[i];
  var href = anchor.getAttribute('data-href');
  anchor.addEventListener('click', function() {
    window.location = href;
  });
}

Solution 2:

I don't think it is possible. But still if you want to achieve this don't make href attribute to go to the destination url, instead use onclick event like :

<ahref="#"onclick="location.href ='http://www.example.com';">Some Text</a>

Post a Comment for "Html Remove Destination From Link"