Answer the question
In order to leave comments, you need to log in
How is the animation implemented when scrolling to an element on the site?
Tell me, please, how is such an animation implemented, when, upon reaching a certain position on the site, does it start to work? What technologies are used? How to do for yourself?
Example: sell.fairandsquare.ru
Answer the question
In order to leave comments, you need to log in
function isScrolledIntoView(elem)
{
var docViewTop = $(window).scrollTop();
var docViewBottom = docViewTop + $(window).height();
var elemTop = $(elem).offset().top;
var elemBottom = elemTop + $(elem).height();
return ((elemBottom <= docViewBottom) && (elemTop >= docViewTop));
}
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question