-
-
Save klesh/c7adf99b4464f41f449b3d13bdebc71b to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var P = require('bluebird'); // 浏览器环境可忽略此行 http://bluebirdjs.com/docs/getting-started.html | |
var $e = $('.box'); | |
P.each(['a', 'b', 'c'], function(html) { | |
return P.delay(1000).then(function(){ | |
$e.html(html); | |
}); | |
}).then(function() { | |
console.log('done'); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment