View Full Version : Sticky Tooltip script: is there a way to around having all the iframes loading

07-17-2018, 06:52 PM
1) Script Title: Sticky Tooltip script

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

3) Describe problem: I am trying, for my own education, to build a timeline based on http://visjs.org/timeline_examples.html.

What I'd like and have got working is to have a stickytooltip on each timeline item/box. I've tried other popups/tooltips but none are as slick as the sticktooltip. The trouble starts when I have too many boxes, which in my case will be wiki pages. At around 50 Wiki tooltips, the page takes forever to load. The outcome is great but I'd like to add even more. So is there a way to only have the wiki page on each tooltip only load when there's a mouseover? Any help would be greatly appreciated. I am a relative newbie at this type of programming.

I have tried the Page Visibility API but the visibility of the iframes is the same as the parent.

I have found this code online

<script type="text/javascript">

function loadIFrame(frameID, url) {
var frame = document.getElementById(frameID);
frame.setAttribute('src', url);
frame.style.display = 'block';

which works the way I want, all by itself, but not with vis.js