Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Just asking which is the better way..
// Method 1 - how i would do it (although i've only used other lazy loaders before)
if(!Modernizr.inputtypes.date) {
yepnope({
load : [
'scripts/jquery.js',
'scripts/jquery-ui.js',
'css/jquery-ui.css',
'scripts/datepicker.js'
]
});
}
// Method 2 ... how the article suggests...
yepnope({
test : Modernizr.inputtypes.date,
nope : [
'scripts/jquery.js',
'scripts/jquery-ui.js',
'css/jquery-ui.css',
'scripts/datepicker.js'
]
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.