Commit 7f8e7ca1 authored by robertDouglass's avatar robertDouglass
Browse files

stats hover states faded on page load

parent ca9430e6
......@@ -3,29 +3,28 @@
Drupal.memcacheHoverData = function() {
$('div.memcache_data').each(function() {
var fadeArea = $(this).find('pre'), staticOffsetY = null, staticOffsetX = null;
$(this).find('p').mouseover(hoverOver);
$(this).find('p').mousemove(hoverMove);
$(this).find('p').mouseout(hoverOut);
function hoverOver(e) {
staticOffsetX = -$(this)[0].offsetWidth;
staticOffsetY = -fadeArea[0].offsetHeight - $(this)[0].offsetHeight;
fadeArea.css('opacity', 1.00);
};
function hoverMove(e) {
fadeArea.css('left', Math.round(Drupal.mousePosition(e).x + staticOffsetX) + "px");
fadeArea.css('top', Math.round(Drupal.mousePosition(e).y + staticOffsetY) + "px");
};
function hoverOut(e) {
fadeArea.css('opacity', 0.00);
};
// Do this on initial load
fadeArea.css('opacity', 0.00);
});
};
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment