每秒缩放图像jQuery [英] Zoom an image every one second jQuery
本文介绍了每秒缩放图像jQuery的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我尝试使图像每秒钟缩放一次,当我加载页面时,它可以工作,但我希望每秒钟一次.我认为当我使用与图片相同的ID时会出现问题.
I try to animate an image with zooming every one second, it work when I load my page but I want it every one second. I think when I use the same id of my image it's a problem.
这是我的 JSFIDDLE .
谢谢.
推荐答案
您正在使用setTimeout
,它将在一定时间后执行一些代码,您想要的是setInterval
,它将经常执行一些代码. http://jsfiddle.net/UxTdU/3/
You're using setTimeout
which will execute some code after a certain time, what you want is setInterval
, which will execute some code every so often. http://jsfiddle.net/UxTdU/3/
这篇关于每秒缩放图像jQuery的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文