Skip to content

Instantly share code, notes, and snippets.

@AWaselnuk
AWaselnuk / gist:1392d25b6d5cb79ae681
Last active February 16, 2021 13:34 — forked from carolineschnapp/gist:5397337
Conditionally load jQuery via loadScript
/* Sample JavaScript file added with ScriptTag resource.
This sample file is meant to teach best practices.
Your app will load jQuery if it's not defined.
Your app will load jQuery if jQuery is defined but is too old, e.g. < 1.7.
Your app does not change the definition of $ or jQuery outside the app.
*/
(function(){
/* Load Script function we may need to load jQuery from the Google's CDN */