Note that there are some explanatory texts on larger screens.

plurals
  1. POHow to Show Ballon tooltip when mouse stops
    text
    copied!<p>[edit] So I used one of the javascript tooltips suggested below. I got the tips to show when you stop and hide if you move. The only problem is it works when I do this:</p> <pre><code>document.onmousemove = (function() { var onmousestop = function() { Tip('Click to search here'); document.getElementById('MyDiv').onmousemove = function() { UnTip(); }; }, thread; return function() { clearTimeout(thread); thread = setTimeout(onmousestop, 1500); }; })(); </code></pre> <p>But I want the function to only apply to a specific div and if I change the first line to "document.getElementById('MyDiv').onmousemove = (function() {" I get a javascript error document.getElementById('MyDiv') is null What am I missing....??</p> <p>[/edit]</p> <p>I want to display a balloon style message when the users mouse stops on an element from more than say 1.5 seconds. And then if they move the mouse I would like to hide the balloon. I am trying to use some JavaScript code I found posted out in the wild. Here is the code I am using to detect when the mouse has stopped:</p> <pre><code>document.onmousemove = (function() { var onmousestop = function() { //code to show the ballon }; }, thread; return function() { clearTimeout(thread); thread = setTimeout(onmousestop, 1500); }; })(); </code></pre> <p>So I have two questions. One, does anyone have a recommended lightweight javascript balloon that will display at the cursor location. And two, the detect mouse stopped code works ok but I am stumped on how to detect that the mouse has started moving again and hide the balloon. Thanks...</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload