Skip to content

Instantly share code, notes, and snippets.

@arestov
Created September 15, 2011 09:14
Show Gist options
  • Save arestov/1218873 to your computer and use it in GitHub Desktop.
Save arestov/1218873 to your computer and use it in GitHub Desktop.
toster.ru
$(function() {
$(".e-people").hover(function()
{
$(".e-people a").fadeIn(200);
}, function()
{
$(".e-people a").fadeOut(200);
});
$(document).mousemove(function(e)
{
var epos = $(".e-people").offset();
var npos = e.pageX - epos.left;
if (npos < 80) return false;
if (npos > $(".e-people").width() - 100) return false;
$(".e-people a").css("left", npos - 59);
});
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment