fadeto jquery code example
Example 1: on click fade out jquery
$(document).ready(function(){
$("button").click(function(){
$("p").fadeOut(2500);
});
});
Example 2: jquery fadein
$(".example").fadeIn(500);
Example 3: 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.
});
});