Advertisement
tubiroman

Untitled

Dec 8th, 2019
143
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
jQuery 0.86 KB | None | 0 0
  1.             $(window).scroll( function(){
  2.                 $('.fadeIn').each( function(i){
  3.                     var object = $(this).position().top + 35;
  4.                     var bottom_of_window = $(window).scrollTop() + $(window).height();
  5.                     if( bottom_of_window > object ){
  6.                         $(this).animate({'opacity':'1'},350);
  7.                     }
  8.                 });
  9.  
  10.                 $('.fadeRight').each(function(i){
  11.                     var object = $(this).position().top + 15;
  12.                     var bottom_of_window = $(window).scrollTop() + $(window).height();
  13.                     if( bottom_of_window > object ){
  14.                         $(this).animate({
  15.                             'opacity':'1'
  16.                         },350);
  17.                     }                    
  18.                 });                
  19.             });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement