Created
July 18, 2014 21:31
-
-
Save megantaylor/383a430dc16bcdc9d1a0 to your computer and use it in GitHub Desktop.
Fade in/fade out on hover. The code below set opacity to 100% on hover, and to 60% on hover.
This file contains 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
$(document).ready(function(){ | |
$(".thumbs img").fadeTo("slow", 0.6); // This sets the opacity of the thumbs to fade down to 60% when the page loads | |
$(".thumbs img").hover(function(){ | |
$(this).fadeTo("slow", 1.0); // This should set the opacity to 100% on hover | |
},function(){ | |
$(this).fadeTo("slow", 0.6); // This should set the opacity back to 60% on mouseout | |
}); | |
}); | |
//http://snipplr.com/view/18606/ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment