Skip to content

Instantly share code, notes, and snippets.

@andersonleite
Created November 4, 2009 13:59
Show Gist options
  • Save andersonleite/226062 to your computer and use it in GitHub Desktop.
Save andersonleite/226062 to your computer and use it in GitHub Desktop.
$(document).ready(function() {
/* =Reflection -------------------------------------------------------------------------- */
$("#nav-reflection li").append("<span></span>");
$("#nav-reflection a").hover(function() {
$(this).stop().animate({ marginTop: "-10px" }, 200);
$(this).parent().find("span").stop().animate({ marginTop: "18px", opacity: 0.25 }, 200);
},function(){
$(this).stop().animate({ marginTop: "0px" }, 300);
$(this).parent().find("span").stop().animate({ marginTop: "1px", opacity: 1 }, 300);
});
/* =Shadow -------------------------------------------------------------------------- */
$("#nav-shadow li").append('<img class="shadow" src="images/icone-shadow.jpg" width="50" height="27" alt="" />');
$("#nav-shadow li").hover(function() {
$(this).find("a").stop().animate({ marginTop: "-14px" }, 250, function() {
$(this).find("a").animate({ marginTop: "-10px" }, 250);
});
$(this).find("img.shadow").stop().animate({ width: "80%", height: "20px", marginLeft: "8px", opacity: 0.25 }, 250);
},function(){
$(this).find("a").stop().animate({ marginTop: "0px" }, 250, function() {
$(this).find("a").animate({ marginTop: "0px" }, 250);
});
$(this).find("img.shadow").stop().animate({ width: "100%", height: "27px", marginLeft: "0", opacity: 1 }, 250);
});
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment