Created
April 10, 2012 11:59
-
-
Save Takazudo/2350883 to your computer and use it in GitHub Desktop.
deferred on pageready
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 pageReady = $.Deferred(); | |
var myDefer = $.Deferrd(); | |
$(function(){ | |
pageReady.resolve(); | |
}); | |
function doMyThings(){ | |
// blah blah blah | |
myDefer.resolve(); | |
} | |
$.when(pageReady, myDefer).done(function(){ | |
alert('done!'); | |
}); | |
doMyThings(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment