Is there a way to hide the native tooltip action when a user hovers over a anchor tag with a title attribute? I don't want to remove it just don't display the nasty yellow box that is the default tooltip action.
UPDATE:
After reading a couple of other posts I don't think I can hide the title attribute for the native tooltip action, but I'm trying to think outside of the box here. Could I use another attribute instead of the title attribute inside the anchor tag and still keep a valid page???
Removing the title attribute value is not an option unless someone can figure out how to add it back for a onclick event?
WORKING CODE BELOW
$('[title]').each( function() {
var $this = $(this);
$this.data('title',$this.attr('title'));
$this.removeAttr('title');
});
$('a').click( function() {
var $this = $(this);
var title = $this.data('title');
... do your other stuff...
});
I used a variation on bEj ni c bEj's code, because I needed to preserve the title content on hover, but still needed to suppress the default behavior.
This allows me to do this in my stylesheet:
/* abbr & tooltip styles: first, the immediate descendants of the content area are set to highlight abbreviations on hover, but avoiding lists; as we don't want *all* abbreviations highlighted when you hover on a root list */
Giving me pretty tooltips where I need them, without the default tooltip appearing simultaneously.
Try it works like a dog!
I know this is post about Jquery but I just ran in to this issue and is mostly connected with lighboxes so here is Mootools fix for iaian7 Mediabox Advanced on image links if anyone needs it The fix will work on any of these also http://line25.com/articles/rounding-up-the-top-10-mootools-lightbox-scripts
You can remove it by:
This will remove it for js-users only, so it's still accessable and findable for search engines.
Its works like this:
Rename to sTitle instead of default title attribute and if you need to call it from Jquery:
getAttribute('stitle')
It works on all.