using multiple call back function in j query..
html
<div class="box-header">hey i am header</div>
<div style="clear:both !important"></div>
<div class="box-container">hey i am container</div>
css
.box-header{float:left; width:220px; height:40px; padding:5px; background-color:#FF00ED; border:3px solid #A1DF00; margin-bottom:10px;}
.box-container{ float:left; width:220px; height:220px; padding:5px; background-color:#F0FF00; border:3px solid E#001DFF; margin-top:10px;}
J-query
<script type="text/javascript">
$(document).ready(function() {
$('.box-header').click(function(){
$('.box-container').animate({'width':'600px','height':'500px'},2000,function(){
$(this).fadeOut(2000,function(){
$(this).fadeIn(3000,function(){
alert('hey this code is running')
});
});
});
});
});
</script>
$(document).ready(function() {
$('.box-header').click(function(){
$('.box-container').animate({'width':'600px','height':'500px'},2000,function(){
$(this).fadeOut(2000,function(){
$(this).fadeIn(3000,function(){
alert('hey this code is running')
});
});
});
});
});
</script>
No comments:
Post a Comment