Repeat
Repeat
How I can repeat this code every time when all animation end. My Idea is when the animations stop must start again and again and .... every time
The code
- <head>
- <meta http-equiv="Content-Type" content="text/html; charset=windows-1251" />
- <title>Jquery Animation</title>
- <style type="text/css">body{margin:0;padding:0;color:#333}#effectTwo{display:none}</style>
- <link rel="stylesheet" type="text/css" href="http://www.codingjack.com/textfx/css/cj-text-fx.min.css" />
- <script src="http://www.codingjack.com/textfx/js/jquery-1.6.1.min.js" type="text/javascript"></script>
- <script type="text/javascript">jQuery.noConflict();</script>
- <script src="http://www.codingjack.com/textfx/js/jquery.easing.1.3.min.js" type="text/javascript"></script>
- <script src="http://www.codingjack.com/textfx/js/cj-text-fx.min.js" type="text/javascript"></script>
- <script type="text/javascript">
- var isOn=0,sets,fx,toAnimate="#effect",
- settings={animation:2,animationType:"in",backwards:!1,easing:"easeOutQuint",speed:1E3,
- sequenceDelay:100,startDelay:0,offsetX:200,offsetY:80,onComplete:fireThis,restoreHTML:!0};
- jQuery(document).ready(function(){fx=jQuery("#effect");jQuery.cjTextFx(settings);jQuery.cjTextFx.animate(toAnimate)});
- function fireThis(){if(isOn!==13){isOn<13?isOn++:isOn=0;switch(isOn){
- case 1:sets={animationType:"out",restoreHTML:!1};
- break;
- case 2:fx.html("- Text two.");sets={animation:15}; break;
- case 3:sets={animation:11,animationType:"out",restoreHTML:!1}; break;
- case 4:fx.html("Text 3.");sets={animation:1}; break;
- case 5:sets={animation:11,animationType:"out",restoreHTML:!1}; break;
- case 6:fx.html("-Text 4."),sets={animation:14,startDelay:1E3,linked:!0,hyperlink:"generator.html",color:"#0000FF",linkTarget:"_self",onComplete:null}}jQuery.cjTextFx.animate(toAnimate,sets)}};
- </script>
- </head><body><div id="container"><div id="text-fx"><div id="effect" style="font-size: 12px;">-Text number one :) </div>
- </div></div></body></html>