know if mouse out, i can do it backwards, so that onmouseover, wait to show the marker, or kill the call if the mouse is out of the marker.

by sebababi

HTML

<div id="txt"></div>
<div class="tooltip">here you have the tooltip</div>

JavaScript

$(document).hover(function(e) {
    $("#txt").html(e.type == 'mouseenter' ? 'enter' : 'leave');
});

// document or #someElement

$(document).mouseenter(function(){
    clearTimeout($(this).data('timeoutId'));
    $(this).find(".tooltip").fadeIn("slow");
}).mouseleave(function(){
    var someElement = $(this),
        timeoutId = setTimeout(function(){
            someElement.find(".tooltip").fadeOut("slow");
        }, 650);
    //set the timeoutId, allowing us to clear this trigger if the mouse comes back over
    someElement.data('timeoutId', timeoutId); 
});