/* ******************************************* * * Tooltip * Source: Fat-Man Collective - www.fat-man-collective.com * Coded by Yann Lorber - www.yannlorber.fr * August 2009 * ******************************************* */ if( $("a.screenshot").length ) { xOffset = 210; yOffset = -132; $("a.screenshot").hover(function(e){ var imgurl = $(this).attr("id"); $("body").append("<div id='screenshot'><div id='screenshotBox'><img src='images/"+ imgurl +"' /></div><div class='triangle'></div>"+"</div>"); $("#screenshot").css("top",(e.pageY - xOffset) + "px") .css("left",(e.pageX + yOffset) + "px") .fadeIn("fast"); },function(){ $("#screenshot").remove(); }); $("a.screenshot").mousemove(function(e){ $("#screenshot").css("top",(e.pageY - xOffset) + "px") .css("left",(e.pageX + yOffset) + "px"); }); }