$(document).ready(function(){
$.fn.grow_anim=function(){
$("#anim").animate({paddingLeft: "100px"}, 1000);
$(this).shrink_anim();
}
$.fn.shrink_anim=function(){
$("#anim").animate({paddingLeft: "15px"}, 1000);
$(this).grow_anim();
}
$("#anim").bind("mouseenter",function(){
$("#anim").stop(true);
});
$("#anim").bind("mouseleave",function(){
$(this).grow_anim();
});
});
I am explaining below:
Normally animation running and running but when you put your mouse on that Div or text in that time animation will be stop then again when you leave your mouse pointer from that div or text your animation will be running normally.
try it good luck.
$.fn.grow_anim=function(){
$("#anim").animate({paddingLeft: "100px"}, 1000);
$(this).shrink_anim();
}
$.fn.shrink_anim=function(){
$("#anim").animate({paddingLeft: "15px"}, 1000);
$(this).grow_anim();
}
$("#anim").bind("mouseenter",function(){
$("#anim").stop(true);
});
$("#anim").bind("mouseleave",function(){
$(this).grow_anim();
});
});
I am explaining below:
Normally animation running and running but when you put your mouse on that Div or text in that time animation will be stop then again when you leave your mouse pointer from that div or text your animation will be running normally.
try it good luck.
No comments:
Post a Comment