Modernizr/Modernizr — Issue #496: Test complete/callback runs before previous script is done loading
Author: Jakobud
Created: 2012-02-10 07:28:12+00:00
State: open

I wasn't sure to post this issue on yepnope's GitHub or Modernizr... anyways

The following feature test complete:
```
Modernizr.load([
{
// jQuery and libraries
load: '//ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js',
},
{
test: Modernizr.input.placeholder,
nope: '/js/jquery.placeholder.min.js',
complete: function() // Would normally use callback() but using complete() so it runs no matter what
{
$("input").placeholder();
}
}]);
```
It fails because jQuert hasn't finished loading by the time the test runs and the ```callback``` and/or ```complete``` begins to run. Therefore `$` isn't defined yet.