We might need a little back and forth on this to get it right, but it looks fairly easy. The trickiest part will hopefully be getting the paths to the images (both those on the imported pages and those listed in the tooltips array) right. And that's not too hard, you can use their absolute paths. If relative, they should be relative to the 'top' page (yard/articles.php).
What you do is install the Image w/ description tooltip v2.0 scripts and css on the 'top' page. In ddimgtooltip.js where you list the tips:
Code:
/* Image w/ description tooltip v2.0
* Created: April 23rd, 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
*/
var ddimgtooltip={
tiparray:function(){
var tooltips=[]
//define each tooltip below: tooltip[inc]=['path_to_image', 'optional desc', optional_CSS_object]
//For desc parameter, backslash any special characters inside your text such as apotrophes ('). Example: "I\'m the king of the world"
//For CSS object, follow the syntax: {property1:"cssvalue1", property2:"cssvalue2", etc}
tooltips[0]=["red_balloon.gif", "Here is a red balloon<br /> on a white background", {background:"#FFFFFF", color:"black", border:"5px ridge darkblue"}]
tooltips[1]=["duck2.gif", "Here is a duck on a light blue background.", {background:"#DDECFF", width:"200px"}]
tooltips[2]=["../dynamicindex14/winter.jpg"]
tooltips[3]=["../dynamicindex17/bridge.gif", "Bridge to somewhere.", {background:"white", font:"bold 12px Arial"}]
return tooltips //do not remove/change this line
}(),
tooltipoffsets: [20, -30], //additional x and y offset from mouse cursor for tooltips
//***** NO NEED TO E . . .
List all of your tips there, for all pages that will have them. I see you already have tooltips 0 through 16 for colours.htm, so for the other page (layouts.htm) start by adding tooltips[17], then 18, and so on. And on that other page, start with rel="imgtip[17]" instead of 0 for the rel attributes of the a tags.
Import these pages via AJAX, not iframe.
Finally in the Ajax Tabs init on the 'top' page, add the highlighted:
Code:
<script type="text/javascript">
var countries=new ddajaxtabs("countrytabs", "countrydivcontainer")
countries.setpersist(true)
countries.setselectedClassTarget("link") //"link" or "linkparent"
countries.init()
countries.onajaxpageload = function(pageurl){
ddimgtooltip.init("*[rel^=imgtip]");
};
</script>
Bookmarks