Image w/ description tooltip
http://www.dynamicdrive.com/dynamici...agetooltip.htm
How would I make this script compatible with firefox? It is compatible with safari and Internet explorer already.
thanks,
Owen
Image w/ description tooltip
http://www.dynamicdrive.com/dynamici...agetooltip.htm
How would I make this script compatible with firefox? It is compatible with safari and Internet explorer already.
thanks,
Owen
It is already compatible with FF. Safari, I wouldn't be too sure about, not having a Mac to test on. It is only rated for FF, IE and Opera. This means it should fly for NS6+ as well:
IE5+: IE 5 and above
FF1+: Firefox 1.0+. NS6+ and FF beta are assumed as well.
Opr7+: Opera 7 and above.
Last edited by jscheuer1; 12-08-2007 at 07:03 PM. Reason: spelling
- John________________________
Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate
Hi,
i've a visual problem with FF, in particular when i try to view an image the border is too small than the image.
I notice that i change tipWidth variables, the view is better but the images are not with the same with.
What can i do to resolve it?
Thanks in advance,
elisa![]()
It's not really meant to work like this, but I've found that if you set (in the configuration):
And farther down, in the code section get rid of (red):Code://///////////////////// CUSTOMIZE HERE //////////////////// // settings for tooltip // Do you want tip to move when mouse moves over link? var tipFollowMouse= true; // Be sure to set tipWidth wide enough for widest image var tipWidth= 'auto'; var offX= 20; // how fa . . .
It can work out pretty well. Once you do that, you may want to format the text part of the tip, examples -Code://////////////////////////////////////////////////////////// // initTip - initialization for tooltip. // Global variables for tooltip. // Set styles // Set up mousemove capture if tipFollowMouse set true. //////////////////////////////////////////////////////////// var tooltip, tipcss; function initTip() { if (nodyn) return; tooltip = (ie4)? document.all['tipDiv']: (ie5||ns5)? document.getElementById('tipDiv'): null; tipcss = tooltip.style; if (ie4||ie5||ns5) { // ns4 would lose all this on rewrites tipcss.width = tipWidth+"px"; tipcss.fontFamily = tipFontFamily; tipcss.fontSize = tipFontSize; tipcss.color = tipFontColor; tipcss.backgroundCo . . .
For precision, and allowing for the user perhaps adjusting his/her font sizes in the browser:
For best results, generally set the div width to the width of the image for that tip.Code:messages[0] = new Array('images/dot-com-btn.gif','<div style="width:176px;">Here is a red balloon on a white background<\/div>',"#FFFFFF");
Quick and dirty:
Code:messages[0] = new Array('images/dot-com-btn.gif','Here is a red balloon<br> on a white background',"#FFFFFF");
- John________________________
Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate
hi,
thanks for you precious help, I've change var tipWidth= 'auto'; so the image's border on FF is perfect, but... on IE i receive an error, in particular I don't see the image. What can we do?
elisa
If you followed my instructions fully, that shouldn't be happening. Did you follow both changes, not just first one tovar tipWidth?
I tested this in IE 6 and 7 and it worked, as well as in FF, Safari 3 Win, and Opera. If you are still having problems:
Please post a link to the page on your site that contains the problematic code so we can check it out.
- John________________________
Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate
hi,
thanks for your help, so I follow your instructions, so now I can see the images in FF and IE, but in IE the position are fixed and not follow the mouse.
You can see this error
here
thanks in advance,
elisa
You missed one, change:
to:Code:tipcss.width = tipWidth+"px";
Code:tipcss.width = tipWidth;
- John________________________
Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate
thanks so much it's fantastic!! it's all right now
elisa
Bookmarks