A
A
Andr Lw12014-06-11 08:15:43
css
Andr Lw1, 2014-06-11 08:15:43

How to create a css/jqeury animation after a div appears in the browser?

How to create a css/jqeury animation after a div appears in the browser?

Answer the question

In order to leave comments, you need to log in

4 answer(s)
D
Dima Barsukov, 2014-06-11
@mrsombre

use jquery onload

$(function(){
  // тут код анимации и прочего
});

G
GreatRash, 2014-06-11
@GreatRash

I would poll the offsetWidth of the div at a small interval, as soon as it becomes visible (display: block) offsetWidth stops returning 0, then we launch the callback.

S
Sergey Melnikov, 2014-06-11
@mlnkv

A correctly asked question contains three-quarters of the answer.
Try asking the question again.

L
Lisonok, 2014-06-14
@Lisonok

If I understood correctly, then if the div becomes visible when scrolling the page, then you need to start the animation.
Use .scroll() and compare height from start of page to block with window.pageYOffset

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question