Skip to content

Instantly share code, notes, and snippets.

Created April 8, 2010 21:47
Show Gist options
  • Save anonymous/360592 to your computer and use it in GitHub Desktop.
Save anonymous/360592 to your computer and use it in GitHub Desktop.
jQuery(document).ready(function(){
$("#contact").css({right: ( -($("#contact").width() ) + 19 ) });
$("#contact").toggleClass("inactive");
$("#contact").mouseleave(function(){
if ($(this).hasClass('active')) {
$("#contact").toggleClass("active");
$("#contact").animate({right: ( -($("#contact").width() ) + 20 ) },
function() {
$("#contact").toggleClass("inactive");
}
);
}
});
$("#contact.inactive").mouseenter(function(){
$("#contact").toggleClass("inactive");
$("#contact").animate({right: 0 },
function() {
$("#contact").toggleClass("active");
}
);
});
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment