Add an extra check that might prevent stuck profile hovers

This commit is contained in:
calzoneman 2013-08-28 23:30:54 -05:00
parent 02887958cb
commit b603e392e6
1 changed files with 4 additions and 1 deletions

View File

@ -84,8 +84,11 @@ function formatUserlistItem(div, data) {
name.addClass(getNameColor(data.rank)); name.addClass(getNameColor(data.rank));
div.find(".profile-box").remove(); div.find(".profile-box").remove();
var profile; var profile = null;
name.mouseenter(function(ev) { name.mouseenter(function(ev) {
if (profile)
profile.remove();
profile = $("<div/>") profile = $("<div/>")
.addClass("profile-box") .addClass("profile-box")
.css("top", (ev.pageY + 5) + "px") .css("top", (ev.pageY + 5) + "px")