-
Notifications
You must be signed in to change notification settings - Fork 340
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How to handle local fallbacks? #16
Comments
function ready(fn) {
$script('//ajax.googleapis.com/ajax/libs/jquery/1.6.1/jquery.min.js', function () {
window.jQuery ? fn() : $script('js/libs/jquery-1.6.1.min.js', fn)
})
} |
@ded - thanks for your answer, but could you explain a few things to me?
|
regardless of each of those, the |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I am currently loading resources like jquery from google's CDN, but I have a fallback mechanism in place in case the CDN is unavailable:
What would be the best way to accomplish this using $script? How is an action taken if a resource does not get loaded? Or what if the jquery.min.js file does get loaded, but for some reason it is empty or corrupt and doesn't define window.jQuery?
The text was updated successfully, but these errors were encountered: