SaturnsEye
SaturnsEye

Reputation: 6499

Is it possible to hide link address on hover?

I have set up a chart with a lot of links and it really bugs me when it shows where the link goes in the bottom left hand side of the browser whenever you hover on a link, like so:

enter image description here

Is it possible to remove this? any method will do as long as I can hide/remove it (HTML, CSS, JS etc..)

Upvotes: 4

Views: 34542

Answers (3)

Okomikeruko
Okomikeruko

Reputation: 1173

I had a similar problem that led me to this thread. I figured I'd post my solution here rather than start a new thread about it.

I have a WordPress site with complex menus, and those menus had subheadings which the theme rendered as <a> links with empty href values. The site manager didn't want the bottom corner to display as a link if those were hovered over, since they didn't work has a link anyway.

<a href="#" class=" no_link" style="cursor: default;" onclick="Javascript: return false;">

I tried removing the "#" under href but it still showed the site's root url on hover.

Since the anchor tag's class list already included no_link as a class, I simply added the following jQuery to the global JavaScript file:

$("a.no_link").removeAttr("href"); 

Note that the intention was to simply remove a link's address on hover if it wasn't supposed to be a functional link anyway.

Upvotes: -1

user1428716
user1428716

Reputation: 2136

Refer this link here :

 http://www.experts-exchange.com/Web_Development/Miscellaneous/Q_21278295.html

However , if the chart is not under your control, then this may not nbe the way

As suggested in the link :

<a href="www.google.com" onMouseOver="window.status=' '; return true;">Pink Floyd</a>

You can also use jQuery to bind the mouseover event on these anchor links without editing individual <a>

Upvotes: -4

Jakub Konecki
Jakub Konecki

Reputation: 46008

The status bar highlighting happens only when you use an <a> element with a set href.

If you use pure JavaScript to open your link, and don't assign a href attribute, nothing will turn up in the status bar. I don't know how much control you have over the chart html, but if it renders <a> tags there's not much you can do.

You could try running javascript after the chart is renderred to attach onclick event handlers manually to all <a> tags and set href = '#'.

Upvotes: 6

Related Questions