A
A
angelzzz2015-01-28 20:14:49
Animation
angelzzz, 2015-01-28 20:14:49

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

2 answer(s)
A
Alexander Taratin, 2015-01-28
@Taraflex

mynameismatthieu.com/WOW

S
Sergey Shchuchkin, 2015-01-28
@shuchkin

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 question

Ask a Question

731 491 924 answers to any question