I want the DIV to be displayed and displayed by the mouse cursor when the user hovers over the SPAN or DIV.
I made this function, but it does not work (jquery loaded).
function ShowHoverDiv(divid){ function(e){ var left = clientX + "px"; var top = clientY + "px"; $("#"+divid).toggle(150).css("top",top).css("left",left).css("position","fixed"); return false; } } <div id="divtoshow" style="display:none">test</div> <br><br> <span onmouseover="ShowHoverDIV('divtoshow')">Mouse over this</span>
Mbrouwer88
source share