本文介绍了使用setInterval或setTimeout运行javascript无限时间的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

< script>
$(window).load(function(){

var zoom = document.getElementById("zoom");
var fade = document.getElementById("divfade1");
$(#divfade1").hide();
TweenMax.to(zoom,1,{
左:"950px",缓动:Power4.easeInOut,onComplete:function(){
$(#divfade1").fadeIn(100,function(){
TweenMax.to(zoom,1,{
CSS:{
左:"0px",自动Alpha:0
},缓解:Power4.easeInOut,onComplete:function(){
$(#divfade1").fadeOut(100)
}
});
});
}
});
});


</script>

您好,如何使用setInterval或setTimeout使此脚本运行无限次?任何帮助将不胜感激!

<script>
$(window).load(function () {

var zoom = document.getElementById("zoom");
var fade = document.getElementById("divfade1");
$("#divfade1").hide();
TweenMax.to(zoom, 1, {
left: "950px", ease: Power4.easeInOut, onComplete: function () {
$("#divfade1").fadeIn(100, function () {
TweenMax.to(zoom, 1, {
css: {
left: "0px", autoAlpha: 0
}, ease: Power4.easeInOut, onComplete: function () {
$("#divfade1").fadeOut(100)
}
});
});
}
});
});


</script>

Hello, how can you make this script run infinity times using setInterval or setTimeout? any help will be much appreciated!

推荐答案




这篇关于使用setInterval或setTimeout运行javascript无限时间的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-20 16:04