You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
<spanclass="nx">console</span><spanclass="p">.</span><spanclass="nx">log</span><spanclass="p">(</span><spanclass="s1">'`$` already in use; use `jQuery`'</span><spanclass="p">);</span>
Copy file name to clipboardExpand all lines: snippets.json
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -42,7 +42,7 @@
42
42
},
43
43
{
44
44
"name": "jquerify",
45
-
"content": "// jquerify.js\n// https://github.com/bgrins/devtools-snippets\n// Add jQuery to any page that does not have it already.\n\n(function () {\n\n if ( !window.jQuery ) {\n var s = document.createElement('script');\n s.setAttribute('src', '//ajax.googleapis.com/ajax/libs/jquery/2.0.3/jquery.min.js');\ndocument.body.appendChild(s);\n console.log('jquery loaded!');\n }\n\n})();\n"
45
+
"content": "// jquerify.js\n// https://github.com/bgrins/devtools-snippets\n// Add jQuery to any page that does not have it already.\n\n(function () {\n\n if ( !window.jQuery ) {\n var dollarInUse = !!window.$;\n var s = document.createElement('script');\n s.setAttribute('src', '//ajax.googleapis.com/ajax/libs/jquery/2.0.3/jquery.min.js');\ns.addEventListener('load', function(){\nconsole.log('jQuery loaded!');\n\n if(dollarInUse) {\n jQuery.noConflict();\n console.log('`$` already in use; use `jQuery`');\n }\n });\n\n document.body.appendChild(s);\n }\n\n})();\n"
0 commit comments