Created
June 21, 2014 05:18
-
-
Save Trindaz/a8c58d2e911ace1ca7c8 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
<html> | |
<head> | |
<style> | |
.imageList img { | |
transition: opacity 2s ease; | |
} | |
.imageList img.inactive { | |
opacity: 0; | |
} | |
.imageList img.active { | |
opacity: 1; | |
} | |
</style> | |
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js" type="text/javascript"></script> | |
<script> | |
function imageLoaded(){ | |
$('#testImage').removeClass('inactive').addClass('active'); | |
} | |
</script> | |
</head> | |
<body> | |
<div class="imageList"> | |
<img id="testImage" class="inactive" onLoad="imageLoaded();" src="http://i.imgur.com/6AM39pw.gif" /> | |
</div> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment