jquery - Pinterest Style Image Load -


just wondering if had knowledge of pinterest doing make images fade in do.

i'm trying similar on website jquery bits of code found here on stackoverflow not work.

<script type="text/javascript"> $(".banner").bind("load", function () { $(this).fadein(); }); </script>            <img class="banner" src="/<?php echo $bannerurl ?>" /> 

or

<script type="text/javascript">   $(document).ready(function () {   $(".banner").hide();   $(".banner").bind("load", function () { $(this).fadein(); });   }); </script> 

seems may overcomplicating things.

html:

<img src="http://placekitten.com/200/300" class="fadein" /> 

css:

.fadein { display: none; } 

jquery:

$('.fadein').fadein(2500); 

demo here


Comments