`

jquery实现图片的上下缓慢跳动

阅读更多

直接上代码:

$(function(){
	$(".pic").mouseover(function(){
		if(!($(this).is(":animated"))){
			$(this).animate({"top":"-15px",},200).animate({"top":"-0px",},200)
			.animate({"top":"-12px",},200).animate({"top":"-0px",},200)
			.animate({"top":"-6px",},200).animate({"top":"-1px",},200)
			.animate({"top":"-1px",},200).animate({"top":"-0px",},200);
		}
	});
});

 if(!($(this).is(":animated"))) //不让其反复弹动

分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics