We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
window.s3LT = new mo.Animation({ target: $('.s3_layer_lt'), fillMode: 'forwards', duration: 500, iteration: 1, keyframes: { 0: {'opacity': '0', easing: 'ease-in-out'}, 100: {'opacity': '1'} } }); s3LT.on("end",function(){ window.s3LTBack = new mo.Animation({ target: $('.s3_layer_lt'), fillMode: 'forwards', duration: 500, iteration: 1, keyframes: { 0: {'opacity': '0', easing: 'ease-in-out'}, 100: {'transform': 'translate3d(0,0,0)', easing: 'ease-in-out'} } }); })
第一个动画on end的时候再针对本身DOM初始化一个新的动画,此时head标签会无限插入新的animation
The text was updated successfully, but these errors were encountered:
可以考虑用class或者class里的属性来判别 end start避免无限循环 var $snowball = $("#snowball"); $snowball.on('webkitAnimationStart',function(e){ if($(this).hasClass("s2_snowball_out")){ score = score+randTempdom; sendScore(score); }else if($(this).hasClass("s2_snowball_in")){ randTempdom = random(); var snowUrl = ""; if(randTempdom == 50){ snowUrl = "http://7vihcx.com1.z0.glb.clouddn.com/gameA/mobile/images/s2_star5.png"; }else if(randTempdom <50&& randTempdom>19){ snowUrl = "http://7vihcx.com1.z0.glb.clouddn.com/gameA/mobile/images/s2_star4.png"; }else if(randTempdom <20&& randTempdom>7){ snowUrl = "http://7vihcx.com1.z0.glb.clouddn.com/gameA/mobile/images/s2_star3.png"; }else if(randTempdom <7&& randTempdom>2){ snowUrl = "http://7vihcx.com1.z0.glb.clouddn.com/gameA/mobile/images/s2_star2.png"; }else if(randTempdom){ snowUrl = "http://7vihcx.com1.z0.glb.clouddn.com/gameA/mobile/images/s2_star1.png"; } $(".s2_snowball img").attr("src",snowUrl); } });
$snowball.on('webkitAnimationEnd',function(e){ if($(this).hasClass("s2_snowball_out")){ $snowball.removeClass('s2_snowball_out'); $snowball.addClass('s2_snowball_in'); }else if($(this).hasClass("s2_snowball_in")){ $snowball.removeClass('s2_snowball_in'); } });
Sorry, something went wrong.
No branches or pull requests
第一个动画on end的时候再针对本身DOM初始化一个新的动画,此时head标签会无限插入新的animation
The text was updated successfully, but these errors were encountered: