From cae52ef86fc1ed0d8bfd3890ca11d05097cb8cb8 Mon Sep 17 00:00:00 2001 From: calzoneman Date: Sat, 25 Jan 2014 18:12:49 -0600 Subject: [PATCH] Fix profile hover box position --- www/assets/js/util.js | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/www/assets/js/util.js b/www/assets/js/util.js index 04c8511e..06eccf69 100644 --- a/www/assets/js/util.js +++ b/www/assets/js/util.js @@ -99,10 +99,12 @@ function formatUserlistItem(div) { if (profile) profile.remove(); + var top = ev.clientY + 5// - name.position().top; + var left = ev.clientX; profile = $("
") .addClass("profile-box") - .css("top", (ev.pageY + 5) + "px") - .css("left", ev.pageX + "px") + .css("top", top + "px") + .css("left", left + "px") .appendTo(div); if(data.profile.image) { $("").addClass("profile-image") @@ -122,8 +124,10 @@ function formatUserlistItem(div) { $("

").text(data.profile.text).appendTo(profile); }); name.mousemove(function(ev) { - profile.css("top", (ev.pageY + 5) + "px") - .css("left", ev.pageX + "px") + var top = ev.clientY + 5// - name.position().top; + var left = ev.clientX; + profile.css("top", top + "px") + .css("left", left + "px") }); name.mouseleave(function() { profile.remove();