Permalink
Browse files

Updated reject example to use 5 second delay

  • Loading branch information...
1 parent a63eb56 commit cdabe8b78371866d2135b331d7ac1eb6d2a1aefb @MoonScript committed Mar 3, 2013
Showing with 2 additions and 2 deletions.
  1. +2 −2 README.md
View
@@ -14,8 +14,8 @@ $.wait(500).then(function(){
This is similar to [_.delay](http://underscorejs.org/#delay), except that you can cancel the *done* callbacks by calling `.reject()` on the returned Deferred object:
```JavaScript
-var deferred = $.wait(500).done(function(){
- console.log('This won\'t run if the deferred object is rejected.');
+var deferred = $.wait(5000).done(function(){
+ console.log('This won\'t run if the deferred object is rejected within 5 seconds.');
});
if (confirm('Should we cancel the queued action?')) {

0 comments on commit cdabe8b

Please sign in to comment.