Created
February 4, 2011 22:54
-
-
Save zacparker/811949 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
jQuery(function(){ | |
jQuery('.lcp_catlist li a') | |
//Set up the imgs for the green overlay | |
.find('img').css({ | |
position:'relative', | |
zIndex:'1', | |
height: '120px', | |
width: '120px' | |
}) | |
//Back to the <a>s | |
.end().each(function(){ | |
jQuery(this).wrap('<div class="overlay_wrap"></div>') | |
.parent() | |
.css({ //the .overlay_wrap | |
position:'relative', | |
height: '120px', | |
width: '120px' | |
}) | |
.prepend('<div class="overlay"></div>') | |
.find('.overlay') | |
.css({ | |
background:'#4BB6A7', | |
display:'none', | |
position:'absolute', | |
top: '5px', | |
left: '3px', | |
height:'120px', | |
zIndex:'2', | |
width:'105px' | |
}) | |
.end().find('img') | |
.hover( | |
function(){ | |
jQuery(this).parent().parent().find('.overlay').fadeTo("fast",0.3).hover(function(){},function(){ | |
jQuery(this).fadeTo("fast",0,function(){jQuery(this).css('display','none')}); | |
}); | |
} | |
); | |
}); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment