PDA

View Full Version : Hide tooltips on thumbnails



gkornbluth
05-07-2008, 01:19 PM
1) Script Title: Image Thumbnail Viewer II

2) Script URL (on DD): http://www.dynamicdrive.com/dynamicindex4/thumbnail2.htm

3) Describe problem: I would like to hide the tooltip that appears over the thumbnails, while still using the "title" to label the expanded image.

Since the "title" that I'm using is rather verbose, it also obscures the thumbnail when hovering over it.

An example of the code I'm using for an image is:


<a href="http://www.terrerybovich.com/images/400/Icon%205%20rev.jpg"
class="Image-Labels"
title="Icon 5<br>Original (8 x 10in. - 20 x 25cm.) - $350 <br>Print (8 x 10in. - 20 x 25cm.) - $140" rel="enlargeimage::mouseover"
rev="loadarea" ><img border="0" src="http://www.terrerybovich.com/images/75/Icon%205%20rev.jpg"
width="75" height="75" style="margin-bottom: 5px" /></a></div>
</td><td width="34%" valign="top">

The page is at:

www.terrerybovich.com/icons.html

It's probably my lack of understanding and hope someone can take the time to help.

Thanks,

Jerry Kornbluth

jscheuer1
05-07-2008, 03:33 PM
This is causing the 'tip':


title="Icon 5<br>Original (8 x 10in. - 20 x 25cm.) - $350 <br>Print (8 x 10in. - 20 x 25cm.) - $140"

In most bowers, if you were to give the image a title (a simple more appropriate for a tip title), it would override the one on the link. But this will not get rid of the tip, just change it to the one for the image tag. You can try giving the image tag an empty title:


<img src="whatever.jpg" title="">

But that might not be enough to override the title on the link. Try it and see. Otherwise we would need to find a different attribute to use for passing the caption in, which would require editing the script. We could probably piggyback it on the rel attribute. But see what you get with my other suggestion first.

jscheuer1
05-07-2008, 03:48 PM
I just tested, the empty title works in IE but not in FF. So, edit the script here, change:


var description=(thumbnailviewer2.enableTitle && linkobj.getAttribute("title"))? linkobj.getAttribute("title") : "" //Get title attr

to:


var description=linkobj.rel.split('::')[2]? linkobj.rel.split('::')[2] : "";

This will allow you to piggyback on the rel attribute and skip using the title, ex:


<a href="http://www.terrerybovich.com/images/400/Icon%205%20rev.jpg"
class="Image-Labels"
rel="enlargeimage::mouseover::Icon 5<br>Original (8 x 10in. - 20 x 25cm.) - $350 <br>Print (8 x 10in. - 20 x 25cm.) - $140"
rev="loadarea" ><img border="0" src="http://www.terrerybovich.com/images/75/Icon%205%20rev.jpg"
width="75" height="75" style="margin-bottom: 5px" /></a></div>
</td><td width="34%" valign="top">