SlexAxton/yepnope.js — Issue #82: jQuery plugins not loading after jQuery fallback is used
Author: Jakobud
Created: 2011-12-20 21:21:02+00:00
State: open

I have the following:

```
yepnope([
{
load: '//ajax.googleapisISOFFLINE.com/ajax/libs/jquery/1.7.1/jquery.min.js',
complete: function()
{
//jQuery fallback
if ( !window.jQuery )
{
console.log("Loading the jQuery fallback...");
yepnope('http://cdnjs.cloudflare.com/ajax/libs/jquery/1.7.1/jquery.min.js');
}
}
},
{
load: 'http://malsup.github.com/jquery.cycle.all.js',
complete: function()
{
console.log("Done loading the jQuery plugins");
}
}
]);
```

Console output:
```
GET http://ajax.googleapisisoffline.com/ajax/libs/jquery/1.7.1/jquery.min.js <-- 404
Loading the jQuery fallback... <-- alternate jQuery loaded
jquery.cycle.all.js:1062 - Uncaught ReferenceError: jQuery is not defined <-- plugin can't find jQuery
Done loading the jQuery plugins
```

So I force yepnope to load the alternate jQuery. Then when trying to load the yepnope plugin, it can't find jQuery. Why is this?

Also, after trying to load jQuery from the Google APIs CDN (which I'm pretending is offline) there is about a 5-8 second delay where nothing happens. Then all the sudden the jQuery plugin is fetched (but fails to load). Where is this 5-8 second delay coming from? The original jQuery request timing out or something?

Am I doing something wrong?

Here is a jsfiddle to reproduce the problem: http://jsfiddle.net/Vyb44/6/