Answers for "jquery animate scrolltop scroll delay"

1

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");
  }
})
Posted by: Guest on August-16-2020
0

back to top scroll animation jquery

$(function() {
    $(window).scroll(function() {
        if($(this).scrollTop() != 0) {
            $('#toTop').fadeIn();    
        } else {
            $('#toTop').fadeOut();
        }
    });

    $('#toTop').click(function() {
        $('body,html').animate({scrollTop:0},800);
    });    
});​
Posted by: Guest on September-15-2021
0

jquery scroll when object appear on screen make animation

<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<div class="target">
</div>
Posted by: Guest on August-16-2020

Code answers related to "Javascript"

Browse Popular Code Answers by Language