0

I have the source below, which is positioned in the footer page, what I need is start an animation when user scroll down and see it :

<div class="box_one padding_top_bottom_40 centered">
<div class="circle transition_05 animated bounce"><img padding_top_35 animated bounce" src="img/icons/1.png"></img></div>
<p class="title_4 black_c padding_top_20">Made with love</p>
<p class="title_3 black_c padding_top_20">I am some text</p>
</div>
Ferdinand.kraft
  • 12,299
  • 8
  • 43
  • 69
ante1820
  • 122
  • 4
  • 13
  • Where is the animation? You need to paste your CSS code – MarsOne Aug 27 '13 at 15:40
  • 1
    You want to a) identify the scrollTop() position of the top of your content, and b) trigger then animation only once the user has reached that y coordinate. – kunalbhat Aug 27 '13 at 15:41

2 Answers2

0

see here using that you can activate your animation when user reaches the bottom.

window.onscroll = function(ev) {
     if ((window.innerHeight + window.scrollY) >= document.body.offsetHeight) {
    // you're at the bottom of the page
    document.getElementById(div id here).className = animation class;
    }
};
Community
  • 1
  • 1
Math chiller
  • 4,078
  • 6
  • 25
  • 42
0

Use waypoints :

Waypoints is a jQuery plugin that makes it easy to execute a function whenever you scroll to an element.

grigno
  • 3,068
  • 4
  • 33
  • 46