$(function(){ $('.js-m,.js-left').each(function() { var _this = $(this); if ($(window).scrollTop() > _this.offset().top - $(window).height() * 0.95) { _this.stop().transition({ translate: (0, 0), rotate: 0, scale: 1, opacity: 1 },1200); } }); $(window).scroll(function(){ $('.js-m,.js-left').each(function() { var _this = $(this); if ($(window).scrollTop() > _this.offset().top - $(window).height() * 0.95) { _this.stop().transition({ translate: (0, 0), rotate: 0, scale: 1, opacity: 1 },1200); } }); }) });