jquery animate opacity code example
Example 1: 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 2: jquery change position animate
$("#Friends").animate({
top: "-=30px",
}, duration );