Created
October 25, 2010 01:24
-
-
Save davidpadbury/644247 to your computer and use it in GitHub Desktop.
yepnope wait order
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
yepnope([ | |
{ | |
load: 'http://code.jquery.com/jquery-1.4.3.min.js', | |
callback: function(){} | |
}, | |
{ | |
test: Modernizr.input.placeholder, | |
nope: 'js/jquery.placeholder.js', | |
callback: function(inc, testResult) { | |
$('input, textarea').placeholder(); | |
} | |
} | |
]); |
Yep, much clearer for when you don't need a callback. Also wait will be familiar to those who've used LabJS. I've sent a pull based on this.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
That's ugly, isn't it...
Help me come up with a better api for forcing in order loading.
How about?
A callback will still do it naturally, but the
wait
param might be clearer if that's all you're using the callback for...Yes?