We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 10bacbb + c435308 commit 3610382Copy full SHA for 3610382
snippets/jquerify/jquerify.js
@@ -5,10 +5,19 @@
5
(function () {
6
7
if ( !window.jQuery ) {
8
+ var dollarInUse = !!window.$;
9
var s = document.createElement('script');
10
s.setAttribute('src', '//ajax.googleapis.com/ajax/libs/jquery/2.0.3/jquery.min.js');
11
+ s.addEventListener('load', function(){
12
+ console.log('jquery loaded!');
13
+
14
+ if(dollarInUse) {
15
+ jQuery.noConflict();
16
+ console.log('`$` already in use; use `jQuery`');
17
+ }
18
+ });
19
20
document.body.appendChild(s);
- console.log('jquery loaded!');
21
}
22
23
})();
0 commit comments