<a href="link.html" title="Titletext">
...is the code.
I need to use the title
attribute because of slimbox, but I want to hide the title-text that shows up when hovering the mouse over the link.
Any ideas?
<a href="link.html" title="Titletext">
...is the code.
I need to use the title
attribute because of slimbox, but I want to hide the title-text that shows up when hovering the mouse over the link.
Any ideas?
Override/overlay it with an empty jQuery tooltip?
You don't have to use the
title
attribute with Slimbox. See the Multiple Images example near the top of this page: http://code.google.com/p/slimbox/wiki/MooToolsAPI.You can simply remove the
title
attribute from your anchor, and pass thetitle
text (your image's description) to the Slimboxopen
function, which you would call using theonclick
event of your anchor.Using the idea from David Thomas, you can create a more elegant solution using jQuery:
As read on another question, I suggest to switch the "title" attribute to some "data-title" in order to keep it available for screen readers for disabled users. As Lokin said, maintaining the usability of the site to impaired and disabled users should be also something to concern about when developing.
the easiest way would be :
after using your slimbox, add the following code below it:
hope it can help..
To quote Aron Rotteveel's answer from the first dupe linked in my comment to the question (Disabling browser tooltips on links and <abbr>s)