Whenever I hover over a div element, a handler is called to show a hover card of the user.
The issue arises when the handler is still running and I move my mouse out.
Despite that, the hover card continues to display which is not desired.
Is there a way in JavaScript to determine if an element is in a hover state?
showPopup: function() {
moLikeDisLikeUsers.popup = 'show';
var url = '/_service/getHoverCardDetails.ashx';
var pars = Object.toQueryString({ 'prfid': moLikeDisLikeUsers.options.get('profileid'), 'id': moLikeDisLikeUsers.options.get('profileid'), 'ht': "1" });
var target = 'output-div';
if (Object.isUndefined(userkey.get(moLikeDisLikeUsers.options.get('profileid'))) || (userkey.get(moLikeDisLikeUsers.options.get('profileid'))) == '') {
moLikeDisLikeUsers.ajax = new Ajax.Updater(target, url, { method: 'get', parameters: pars, onSuccess: function(transport) {
var response = transport.responseText || "no response text";
var data = transport.responseText.evalJSON(true);
userkey.set(moLikeDisLikeUsers.options.get('profileid'), data);
if (moLikeDisLikeUsers.popup == 'show') {
moLikeDisLikeUsers.drawPopup(data);
}
}
});
}
else {
moLikeDisLikeUsers.drawPopup(userkey.get(moLikeDisLikeUsers.options.get('profileid')));
}
},
hidetip: function() {
if (moLikeDisLikeUsers.tooltip) {
AbortAjaxCall(moLikeDisLikeUsers.ajax);
moLikeDisLikeUsers.popup = 'hidden';
moLikeDisLikeUsers.tooltip.hide();
}
},