$fadeout
Animatie the element`s opacity from visible to invisible
$fadeout( element [, duration] [, callback] )
element [object]
The element will be faded out.duration (optional) [number]
The duration of animation in milliseconds.callback (optional) [function]
The callback function will be fired after the animation is completed.
Notes
This is the most common animation to hide element with better visual effects.
Example
HTML code
<button onclick="start_fadeout()">start fadeout</button> <div id="box">This is a box</div>
CSS code
#box {
width: 200px;
height: 60px;
font-size: 12px;
background: #5599bb;
padding: 10px;
}JavaScript code
function start_fadeout()
{
$fadeout($("box"));
}
Demonstration
This is a box