Log in

View Full Version : Image Tool Tip URL Instruction



ld8
03-23-2021, 02:36 PM
1) Script Title: Image w/ description tooltip v2.0
2) Script URL (on DD): http://www.dynamicdrive.com/dynamicindex4/imagetooltip.htm
3) Describe problem: My only problem is with the instruction to "associate a tooltip with a link on your page": the examples show your types of domains (dynamicdrive.com, javascriptkit.com, cssdrive.com, ...). What "a href" URL do I use for MY link before the "rel" value? If I put my own domain, it opens a new page--not what I want. Sorry to be so stupid. This script is exactly what I need for 3 dozen images within a story on a page. Thanks so much for what I'm sure is a head-slap answer.
This site is a gold mine! So appreciative.

ld8
03-24-2021, 06:12 PM
To give an example, here's a line in my body text using the code:

The life of "somebody" began on April 10, 1933. By all accounts his birth took place in a <a href="#" rel="imgtip[0]">small house</a> in the Some Section of Some City, NC, on Some Street.

I've set up the .js .css carefully, but nothing happens when I mouse over the text. Is it the href issue I'm asking about?
Thanks again for any help.

keyboard
03-25-2021, 01:08 AM
Welcome Id8!

Are you able to provide information if possible? Do you have a test page that we can access to see what the issue is?
If not, can you provide a copy of your code (any relevant HTML and JS).

ld8
03-25-2021, 12:23 PM
Hi keyboard!

Here is a link to the page: https://www.coachcaudlecares.org/llltest.html

I'm hesitant to put it out there b/c it's very new, under development and has personal story info (which will ultimately be made public), but I really need the help. Thanks so much!

keyboard
03-26-2021, 12:06 AM
Thanks for the link! Very helpful for debugging. I understand completely about your hesitancy, and you're welcome to remove the link after you've gotten the help you need.

The issue on the page appears to be because of the code to include the Image w/ description tooltip v2.0 is currently placed within your <style></style> tags. This makes the browser not handle it correctly.

The current layout of your page is like this

<style type="text/css">
ALL OF YOUR CSS IS HERE

<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js"></script>
<link rel="stylesheet" type="text/css" href="ddimgtooltip.css" />
<script type="text/javascript" src="ddimgtooltip.js">
/***********************************************
* Image w/ description tooltip v2.0- (c) Dynamic Drive DHTML code library (www.dynamicdrive.com)
* Please keep this notice intact
* Visit Dynamic Drive at http://www.dynamicdrive.com/ for this script and 100s more
***********************************************/

</script>
</style>

when it should be outside the tags like this

<style type="text/css">
ALL OF YOUR CSS IS HERE
</style>

<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js"></script>
<link rel="stylesheet" type="text/css" href="ddimgtooltip.css" />
<script type="text/javascript" src="ddimgtooltip.js">
/***********************************************
* Image w/ description tooltip v2.0- (c) Dynamic Drive DHTML code library (www.dynamicdrive.com)
* Please keep this notice intact
* Visit Dynamic Drive at http://www.dynamicdrive.com/ for this script and 100s more
***********************************************/
</script>

Hope that makes sense! I've tested after making that change and it seems to resolve the issue. Let me know if that works for you.

ld8
03-26-2021, 12:37 PM
Thanks, keyboard! I made the change you suggested and tried it in Firefox & Chrome, but it still doesn't work for me. :( I cleared cache and still no result. Any other idea why it may not be working? I really appreciate your time.

keyboard
03-31-2021, 08:46 PM
Apologies for the delayed response time! Did you end up figuring this issue out? If not, do you have an updated test page? I checked out the one you posted earlier, but it has changed significantly (and it looks like you may've gotten it to work by switching them from links?)