Created
March 17, 2014 01:37
-
-
Save timsvoice/9592488 to your computer and use it in GitHub Desktop.
js: image rollover reveal
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
//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