<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<title></title>
<style>
#a{
position:absolute;
top:136px;
left:200px;
height:100px;
width:100px;
background:#FF0066;
}
</style>
<script src="scripts/jquery.js"></script>
<script>
var t;
$(function(){
$("#a").click(function(){
$("#a").animate(
{
top:0,
left:0,
t:100
},{
step: function (now){
$(this).css('height',now+'%');
$(this).css('width',now+'%');
},duration:'slow'
},'linear',function(){
alert('hi');
});
})
})
</script>
</head>
<body>
<div id="a"></div>
</body>
</html
I want a function after the animate function is complete.But since I am using step the function is not getting called when the animation is complete.Is it possible to call function when animate with step is used? Or is there any other way by which I could call the function when my animation is complete?