Javascript Tooltip / Posts /

tooltip disables onmouseout

1
I have the following code:

var item = "<img class='thumb' ...
         + " onmouseout=mouseMovedFromItem(" + eventId + ")" 
         + " onmouseover=createTooltip(this," + eventId + ")" 
        + " onClick=fly(" + eventId + ")" 
        + ">";

Problem is, after I added createTooltip, onmouseout stopped working. How can this be fixed?
Eva  11 years ago   viewed: 4134    

1 Answer

0
The tooltip will override the onmouseout event of the item. You should avoid binding onmouseout event to the element that has the onmouseover="tooltip.open(this, '...')" event.

You can try this:
var item = "<span onmouseout=mouseMovedFromItem(" + eventId + ")><img class='thumb' ...
         + " onmouseover=createTooltip(this," + eventId + ")" 
        + " onClick=fly(" + eventId + ")" 
        + " /></span>";
milo   11 years ago

   

Your name*
Password
(Optional. Used to modify this post afterwords)
+ =  

Ask your Own Question

  • If your question is related to the topic of this post, you can post your question to this page by clicking the "Post a reply" button at left;

  • When you want to start a new page for your question: