Sequence pause after and go : Sequence « Dojo toolkit « JavaScript Tutorial






<html>
  <head>
    <script type="text/javascript">
      var djConfig = {
        baseScriptUri : "js/dojo/",
        parseOnLoad : true
      };
    </script>
    <script type="text/javascript" src="js/dojo/dojo/dojo.js"></script>
    <script>
      dojo.require("dojox.timing.Sequence");

      function writeText(msg) {
        dojo.byId("my").innerHTML += msg + "<br>";
      }

      function testIt() {
        var s = new dojox.timing.Sequence({});
        var funcs = [
          {func : [writeText, this, "Pause:  2 seconds"],pauseAfter : 2000},
        ];
        
        s.go(funcs, function() { writeText("Done"); });
      }
    </script>
  </head>

  <body onLoad="testIt();">
        <div id="my">&nbsp;</div>
  </body>
</html>








29.93.Sequence
29.93.1.Sequence pause after and go