jQuery图像动画 [英] JQuery image animation
本文介绍了jQuery图像动画的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
好的,我正在做一个简单的JQuery动画.一幅图像将向左移动1000px,一旦停止,它将被替换为另一幅图像.下面的代码:
Ok, I was doing a simple JQuery animation. An image will move to the left by 1000px, once it stops, it will be replaced to another image. The code below:
function image1() {
$(''#photo'').animate({left: ''1000px''}, 40000, function() {
$(''#photo'').attr(''src'', ''image2.jpg'');
setTimeout("image1", "2000")
});
}
问题,它不起作用.如何解决?
The issue, it does not work. How to tackle it?
Thank!
推荐答案
(``#photo'').animate({left:``1000px''},40000,function(){
(''#photo'').animate({left: ''1000px''}, 40000, function() {
(``#photo'').attr(``src'',``image2.jpg''); setTimeout("image1","2000") }); }
(''#photo'').attr(''src'', ''image2.jpg''); setTimeout("image1", "2000") }); }
问题,它不起作用.如何解决?
谢谢!
The issue, it does not work. How to tackle it?
Thank!
您好,我尝试了此方法的正常工作
Hi i tried this working properly
这篇关于jQuery图像动画的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文