PDA

View Full Version : Speech Bubbles adding js and css



johnbroome
03-12-2012, 12:00 PM
Hi All,

This url http://www.dynamicdrive.com/dynamicindex5/speechbubblestooltip.htm.

is for some js and css and some on post use of id and classes (not much).

The write up says put the js in the same directory as the page/post but WP is SQL and that's not in the js and css folder.

So I have added the css to style.css where do I call the js from, I assume it goes in the same place as the style.css.

The site is www.paaudiovisual.co.uk, Crystal theme.


Cheers,

John

ddadmin
03-13-2012, 07:14 AM
When in doubt about the path you should specify to the .js/ .css files of the script, simply use absolute URLs to them. Right now you have:


<link rel="stylesheet" type="text/css" href="speechbubbles.css" />

<script src="speechbubbles.js">

/***********************************************
* Speech Bubbles Tooltip- (c) Dynamic Drive (www.dynamicdrive.com)
* This notice MUST stay intact for legal use
* Visit http://www.dynamicdrive.com/ for this script and 100s more.
***********************************************/

</script>

on your page, which assumes the files are located at http://www.paaudiovisual.co.uk/speechbubbles.css and http://www.paaudiovisual.co.uk/speechbubbles.js Both are broken if you click on those links btw. What you should do is upload these two files to the two locations pointed to by the above links, then modify your references to absolute URLs:


<link rel="stylesheet" type="text/css" href="http://www.paaudiovisual.co.uk/speechbubbles.css" />

<script src="http://www.paaudiovisual.co.uk/speechbubbles.js">

/***********************************************
* Speech Bubbles Tooltip- (c) Dynamic Drive (www.dynamicdrive.com)
* This notice MUST stay intact for legal use
* Visit http://www.dynamicdrive.com/ for this script and 100s more.
***********************************************/

</script>

This way, you can use the above references on any page on your site and expect the references to work.