PDA

View Full Version : mouseover ToolTip Script



Chimbo
09-07-2011, 06:48 AM
Someone please help.
The very first line in the script below appears to be needed, with the ajax.googleapis.com part.

OK, but there's a whole bunch of other stuff, and I've successfully converted it all to my site, and it works like a charm. I'd just like to know if there's a way to make it work without that line. Like an alternative to that line, or at least help me understand what it does.

I've tried removing it, the "src" part to the end of the statement and sure enough, it keeps it from working properly.

What is the work around, if any, instead of having that line?

Thanks,

Chimbo



Tooltip script:

<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)
* This notice MUST stay intact for legal use
* Visit Dynamic Drive at http://www.dynamicdrive.com/ for this script and 100s more
***********************************************/

</script>

azoomer
09-07-2011, 10:36 AM
This line
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js"></script>
is a link to the jQuery javascript library hosted on googles server. jQuery is needed for the tooltip script to work. If you will you can download it, and put it on your own server, but you still need a link to it. There is really no workaround if you want to use this tooltip script
http://www.dynamicdrive.com/dynamicindex4/imagetooltip.htm

Chimbo
09-07-2011, 09:54 PM
This line
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js"></script>
is a link to the jQuery javascript library hosted on googles server. jQuery is needed for the tooltip script to work. If you will you can download it, and put it on your own server, but you still need a link to it. There is really no workaround if you want to use this tooltip script
http://www.dynamicdrive.com/dynamicindex4/imagetooltip.htm

Thats fine, but it seems like for the code I've learned to implement, there is still some 'secret' code, which I'd rather know what it does, instead of blindly having to use it.

But thanks for your help, I'll go through this too.

Minos
09-07-2011, 10:10 PM
It isn't a really "secret", and you could easily look through the jQuery API (http://api.jquery.com/) to learn more about it.

Removing the line is possible, but would require a complete redesign of the script.

azoomer
09-07-2011, 10:30 PM
If you prefer to avoid jQuery, then here is an example of another tooltip script that doesn't require jQuery:
http://www.dynamicdrive.com/dynamicindex5/balloontooltip.htm