Demo of Jquery Fade UI effects


Fade 500ms will end with callback function to show alert window.

Refresh this page
Apply Fade effects by clicking the buttons





CSS


<style>
.msg{ 
position: absolute;
FONT-SIZE: 12px;
font-family: Verdana;
padding:10px;
width:350px;
height: 100px;
background-color: #f1f1f1;

}
</style>

HTML


<input type=button id=b1 value='Fade 5000ms'>
<input type=button id=b2 value='Fade fast'>
<input type=button id=b3 value='Fade slow'>
<input type=button id=b4 value='Fade Default'>

jquery


<script>
$(document).ready(function() {
$('#b1').click(function(){
$( "#d1" ).effect( "fade",5000,function(){
alert('This alert is created by using callback function once the effect is over');
} );
})
/////////
////////////////////
$('#b2').click(function(){
$( "#d1" ).effect( "fade",'fast' );
})

$('#b3').click(function(){
$( "#d1" ).effect( "fade",'slow' );
})

$('#b4').click(function(){
$( "#d1" ).effect( "fade");
})

})
</script>