javascript :OnMouseout event being called when i move the cursor over an element without going OUT of the element -


i have image in page , in "onmouseover" event of image call javascript function show tooltip , in "onmouseout" of image, call method hide tooltip.now found when place cursor on image,its calling method show tooltip div.and if move mouse within image,its calling onmouseout event(even if not out of image).how can stop . want onmouseout called when cursor out of image ? thoughts ? in advance

here how call it

 <img src="images/customer.png" onmouseout="hidecustomerinfo()" onmouseover="showcustomerinfo(485)" /> 

and in javascript

 function showcustomerinfo(id) {    var currentcustomer = $("#hdncustomerid").val();     if (currentcustomer != id) { // stop making ajax call everytime when mouse move on same image       $.get('../lib/handlers/userhandler.aspx?mode=custinfo&cid=' + id, function (data) {          strhtml = data;      });       tooltip.show(strhtml);   // method in jquery pluggin      $("#hdncustomerid").val(id);  } }  function hidecustomerinfo() {   tooltip.hide();    // method in jquery pluggin  $("#hdncustomerid").val(0); //setting in hidden variable in page   } 

i assuming mousing on tooltip? , tooltip has markup outside realm of image?

so mousing on tooltip technically leaving image. have had similar things happen me.

to around this, try sticking div around image, , putting mouse on div, child element div have tooltip, when mousing on tooltip, still inside div.

that might work.


Comments

Popular posts from this blog

c++ - Convert big endian to little endian when reading from a binary file -

C#: Application without a window or taskbar item (background app) that can still use Console.WriteLine() -

unicode - Are email addresses allowed to contain non-alphanumeric characters? -