Guest User

Untitled

a guest
Apr 20th, 2018
90
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.53 KB | None | 0 0
  1. $('.contentwrap img').hide().load(function () {
  2. $(this).fadeIn(1000);
  3. });
  4.  
  5. <img src="..." alt="..." onload="$(this).fadeIn();">
  6.  
  7. .contentwrap img {
  8. display:none;
  9. }
  10.  
  11. // fade in images already loaded:
  12. $('.contentwrap img').fadeIn(1000);
  13. // and tell pending images to do the same, once they've finished loading:
  14. $('.contentwrap img').load(function () {
  15. $(this).fadeIn(1000);
  16. });
  17.  
  18. $(document).ready(function() {
  19. // put all your jQuery goodness in here.
  20. });
  21.  
  22. $('body').ready(function() {
  23. //your code here
  24. });
Add Comment
Please, Sign In to add comment