Skip to content

Instantly share code, notes, and snippets.

@MilkZoft
Created January 16, 2012 04:13
Show Gist options
  • Select an option

  • Save MilkZoft/1619026 to your computer and use it in GitHub Desktop.

Select an option

Save MilkZoft/1619026 to your computer and use it in GitHub Desktop.
code.jobs - Fade in/out on hover - jQuery
$(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
});
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment