19 September 2019

How to use if condition and change on scroll in jqurey?

 use if condition  and change on scroll in jqurey?



<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.4.1/jquery.min.js"></script>
<script>

$(document).ready(function(){
var $w = $(window).scroll(function(){
    if ( $w.scrollTop() > 1000 ) { 
        alert("hello");

     
    } else {
      // ...
    }
});
});

</script>

No comments:

Post a Comment

How to create youtube videos slider with play and pause option in wordpress?

Create youtube videos slider with play and pause option in wordpress youtube videos slider Use this shortcode:- [punjab_today] function my_...