PDA

View Full Version : Speech Bubbles Tooltip Script Conflict?



Greasus Chrysler
08-23-2016, 09:59 PM
1) Script Title: Dynamic Drive DHTML Speech Bubbles Tooltip

2) Script URL (on DD): http://www.dynamicdrive.com/dynamicindex5/speechbubblestooltip.htm

3) Describe problem: The script is awesome, beautiful, I love it, but it conflicts with my sticky header and menu, which stops working on any page I use the script. I'm assuming it's the http://ajax.googleapis.com/ajax/libs/jquery/1.4.4/jquery.min.js script that's conflicting with my menu and header, which are includes, by the way.


http://revelationinspace.com/library/acvaghosha.shtml - Page where tooltip works fine but menu and header include do not work.

http://revelationinspace.com/library/acvaghosha2.shtml - Example of page working without tooltip script.

I'm hoping I don't have to choose between these and can make them work together.

Thanks in advance for any assistance you can provide.

jscheuer1
08-24-2016, 12:15 AM
OK, this is a bit of a long shot, but often works in cases like this. On the page where the tool tip works, assuming all the requisite scripts for the menu, etc. are present, put the tool tip scripts:


<!-- TOOLTIP -->
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.4/jquery.min.js"></script>
<link rel="stylesheet" type="text/css" href="http://www.revelationinspace.com/css/speechbubbles.css" />
<script src="http://www.revelationinspace.com/js/speechbubbles.js">

/***********************************************
* Speech Bubbles Tooltip- (c) Dynamic Drive (www.dynamicdrive.com)
* Please keep this notice intact
* Visit http://www.dynamicdrive.com/ for this script and 100s more.
***********************************************/

</script>

<script type="text/javascript">

jQuery(function($){ //on document.ready
//Apply tooltip to links with class="addspeech", plus look inside 'speechdata.txt' for the tooltip markups
$('a.addspeech').speechbubble({url:'acvaghoshafootnotes.txt'})
})

</script>

before any other scripts on the page, and using a text only editor like NotePad, add this to the tool tip script (near the beginning, addition highlighted):


/*Speech Bubbles Tooltip (Initial: Dec 8th, 2010)
* This notice must stay intact for usage
* Author: Dynamic Drive at http://www.dynamicdrive.com/
* Visit http://www.dynamicdrive.com/ for full source code
*/
jQuery.noConflict();
var speechbubbles_tooltip={

loadcontent:function($, selector, options, callback){
var ajaxfriendlyurl=options.url.replace(/^http:\/\/[^\/]+\//i, "http://"+window.location.hostname+"/")
$.ajax({
url: ajaxfrie . . .

Save and use that version.

The page will need to be refreshed and/or the browser cache emptied to see changes.

If no luck, put up a demo with the suggested changes - I may well be able to take it from there.

But, as I say, this often works in these sorts of circumstances.

Greasus Chrysler
08-24-2016, 02:05 AM
OK, this is a bit of a long shot, but often works in cases like this. On the page where the tool tip works, assuming all the requisite scripts for the menu, etc. are present, put the tool tip scripts:

I tried it John, and I couldn't get it to work. I think this is way over my head. It turns out that some of my footnotes are as much as 3 huge paragraphs, which doesn't work well with a tooltip. So, I've decided to just use the traditional footnote anchor. A pity, I really liked the tooltip.

Thanks for your help, I appreciate it.