Finder
0
Q:

jquery scroll when object appear on screen make animation

$(window).on("scroll", function(){
  if($(window).scrollTop() + $(window).height() - 100 >= $(".target").offset().top){
    alert("On viewport");
  }
})
0
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<div class="target">
</div>
0
body{
  padding-top: 150vh;
}

.target{
  background: red;
  width: 100%;
  height: 50px;
  margin-bottom: 500px;
}
0

New to Communities?

Join the community