Skip to content

Instantly share code, notes, and snippets.

@ajbeaven
Created April 19, 2013 01:19
Show Gist options
  • Save ajbeaven/5417456 to your computer and use it in GitHub Desktop.
Save ajbeaven/5417456 to your computer and use it in GitHub Desktop.
Showing how Modernizr.Load calls the complete() function weirdly. Run in ie7 to see the problem.
$(function () {
Modernizr.load([
{
test: Modernizr.json,
nope: ['js/vendor/polyfills/json3.js'],
complete: function() {
alert('json3 loaded: json ' + (window.JSON ? 'exists' : 'doesn\'t exist'));
}
},
{
complete: function () {
alert('All completed: json ' + (window.JSON ? 'exists' : 'does\'t exist'));
}
}
]);
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment