PDA

View Full Version : arrow instead of hand on mouse-over link



chechu
09-16-2009, 11:55 AM
1) Script Title: Image w/ description tooltip

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

3) Describe problem: Hey, I use this script to have a pop-up text, but without link. Therefore is it posible to change the hand (indicating a link) into an arrow, please ?

I added this in the code, but doesn't work:

<a href="#" onmouseover="doTooltip(event,0)" onmouseout="hideTip()" style="cursor:pointer;"><img src="pics/pic1.jpg" alt="" style="border:1px#222;margin-bottom:20px;"></a>


This is where you can see the page: http://www.casalplanet.com/apparts.php

chechu
09-21-2009, 07:18 AM
Anyone, please ?

forum_amnesiac
09-21-2009, 07:30 AM
Have you tried changing to this in the doTooltip function:


var tip = startStr + messages[num][0] + midStr + '<span style="cursor:pointer;font-family:' + tipFontFamily + '; font-size:' + tipFontSize + '; color:' + curFontColor + ';">' + messages[num][1] + '</span>' + endStr;

chechu
09-21-2009, 07:46 AM
Thanks for your reply.
Doesn't seem to work either.

forum_amnesiac
09-21-2009, 01:33 PM
If there is no link do you need to have the cursor at all, you could use <span> instead, if you do want a pointer you can add the default pointer to the span style, you could also underline/highlight the text.

Create a class for <span>


<style>
span.tooltip{
cursor: default;
}
</style>

Then use it like this


<span class="tooltip" onmouseover="doTooltip(event,0)" onmouseout="hideTip()">Link 1</span><br>
<span class="tooltip" onmouseover="doTooltip(event,1)" onmouseout="hideTip()">Link 2</span>

You could add to the style to highlight the text.

chechu
09-21-2009, 01:50 PM
I added the html code in the head, and then adjusted the following:

<a href="#" class="tooltip" onmouseover="doTooltip(event,0)" onmouseout="hideTip()">
Still no result.

forum_amnesiac
09-21-2009, 02:27 PM
Use the HTML code in the body section to replace the <a href> part

instead of :


<a href="#" class="tooltip" onmouseover="doTooltip(event,0)" onmouseout="hideTip()">Link 1</a>

use this :


<span class="tooltip" onmouseover="doTooltip(event,0)" onmouseout="hideTip()">Link 1</span>

chechu
09-21-2009, 02:45 PM
Works perfectly !
Sorry I misunderstood you.
You can see it in full action here: www.casalplanet.com/apparts.php (http://www.casalplanet.com/apparts.php)