views:

91

answers:

2

I have a image set as a link, with a title which is used for a caption in a lightbox. I need the "title" set in order to keep the caption for the lightbox, but I don't want the tool tip to pop up when I hover over the links. Anyone got a easy css fix? Or does this need to be done in Javascript?

+1  A: 

This can only be fixed in Javascript.

You can remove the tooltips like this:

$('...').removeAttr('title');

However, depending on your lightbox, you might not want to.
Which lightbox are you using?
When does it read the title attributes?
Can it be configured to read a different attribute instead?

SLaks
This is the lightbox I am using. http://leandrovieira.com/projects/jquery/lightbox/ . I'm not sure if it can be configured to read a different attribute?
Jonathan Garrido
This is completely impossible to do with that lightbox plugin. (The plugin reads the `title` attribute on each click and cannot be reconfigured) You could modify the [source](http://leandrovieira.com/projects/jquery/lightbox/js/jquery.lightbox-0.5.js) to read a different attribute.
SLaks
Fixed it thanks! I changed up which attribute it was using for the captions in the lightbox. Thanks for your help
Jonathan Garrido
Then you should accept this answer by clicking the hollow check.
SLaks
A: 

As far as I know the only way to disable the alt tag text box is to code it as alt="" and not put anything into them. The purpose is to help the impaired and or those who have images turned off. For those with readers, the reader looks for the alt tag and tells the user what that particular image is [based on what is in the tag]. Many website designers use those tags to describe the link, if that is what the image has, others put the "" in if it is only an image.

EDIT:

The same should also work for the title attribute. Play around with both of those and see if you can get the desired result.

Caleb Thompson
I know how to disable the alt tags but I can't figure out the title tags. I really actually don't want to disable it because I need the information in it, I just want to hide it in regards to the tool tip.
Jonathan Garrido
Any chance you can change the attribute that the lightbox reads to something else by going into the source code itself. Doing that, you might be able to use a custom tag like `caption`, `lightbox_caption` or something similar.
Caleb Thompson