Answer the question
In order to leave comments, you need to log in
Animate css on scroll. How to implement?
Hello, I came up with the idea to add animate.css to the site when scrolling.
There is a script to make the animation work when scrolling:
$(window).scroll(function (){
$(' .zoom').each(function (){
var imagePos = $(this).offset().top;
var topOfWindow = $(window).scrollTop();
if (imagePos < topOfWindow+1000){
$(this).addClass('zoomIn');
}
});
});
Answer the question
In order to leave comments, you need to log in
as I understand the animation should work when scrolling to the element,
try the viewportchecker.js plugin
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question