jquery fade in on scroll code example

Example 1: on click fade out jquery

$(document).ready(function(){
  $("button").click(function(){
    $("p").fadeOut(2500);
  });
});

Example 2: jquery fade opacity

<div id="clickme">
  Click here
</div>
<img id="book" src="book.png" alt="" width="100" height="123">
// With the element initially shown, we can dim it slowly:
$( "#clickme" ).click(function() {
  $( "#book" ).fadeTo( "slow" , 0.5, function() {
    // Animation complete.
  });
});

Example 3: fade in onscroll jquery

<div data-aos="fade-down"></div>

Example 4: fade in onscroll jquery

<div data-aos="fade-up"></div>