Skip to content

Instantly share code, notes, and snippets.

@timsvoice
Created March 17, 2014 01:37
Show Gist options
  • Save timsvoice/9592488 to your computer and use it in GitHub Desktop.
Save timsvoice/9592488 to your computer and use it in GitHub Desktop.
js: image rollover reveal
//Rollover Image Effect with jQuery and CSS
//jQuery
$( document ).ready(function() {
$('.project.teaser').hover(
function(){
$(this).find('.project.description').fadeIn(1);
},
function(){
$(this).find('.project.description').fadeOut(250);
}
);
});
//CSS
.project.description {
position: absolute;
right: 0;
bottom: 0;
height: 100%;
width: 100%;
padding: 1rem;
display: none;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment