Currently https://code.jquery.com is not reachable for some people (ipv6 issues) . This fiddle is a workaround to copy paste above other fiddles using jquery to make them work again.
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.6.0/jquery.min.js"></script>
<!-- https://jsfiddle.net/ElMoonLite/e9um30x7/ -->
<!--
remove above to see if the built in jsfiddle jquery loading works again
-->
<a target="_blank" href="https://code.jquery.com">https://code.jquery.com</a> is not available for some people (apparently ipv6 issues in pathing).<br>
This causes the automatic loading of jQuery in jsfiddle to fail.<br>
This fiddle tries to find a simple way to work around it.<br>
Currently it seems enough to just copy paste a script tag on top of the html panel loading it manually.<br>
<hr>
Testing if jQuery workaround works... output should follow with jQuery version:<br>
JavaScript
// turns out all you need is copy paste the script tag to the html panel:
// <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.6.0/jquery.min.js">< /script>
// ( < /script> broken script tag on purpose, jsfiddle does not like it in this javascript panel)
/*
var $;
(function(){
// https://code.jquery.com is not reachable so all jquery is failing.
// For now as (hopefully) temp workaround, using other cdn:
//
// Put this in html tab: [script src="https://ajax.googleapis.com/ajax/libs/jquery/3.6.0/jquery.min.js"][/script]
// (when putting [/script] here with proper tag characters everything breaks so pasted with square brackets)
//
// The while loop is evil, but this makes code halt before code below until we have $ available.
// After 3 sec or n loops break out so we do not get stuck in an infinite loop.
//
var script_loaded = false, fallback = false, n=0;
var script = document.createElement('script');
script.src = 'https://ajax.googleapis.com/ajax/libs/jquery/3.6.0/jquery.min.js';
script.type = 'text/javascript';
script.onload = function(){script_loaded = true};
document.head.appendChild(script);
// console.log(script);
setTimeout(function(){ fallback = true; }, 3000);
while(!window.$) {
if(script_loaded || fallback || n++ > 10000){break;}
}
$ = window.$;
})();
*/
$(document).ready(function(){
if ($ && $.fn && $.fn.jquery) {
var msg = 'jQuery loaded v:' + $.fn.jquery;
document.body.innerHTML += msg;
setTimeout(function(){alert(msg);}, 1);
}
});
Please Whitelist JSFiddle in your content blocker.
Help keep JSFiddle free for always by one of two ways:
Whitelist JSFiddle in your content blocker (two clicks)
Go PRO and get access to additional PRO features →
Join the 4+ million users, and keep the JSFiddle dream alive.
Ad-free
All ads in the editor and listing pages are turned completely off.
Use pre-released features
You get to try and use features (like the Palette Color Generator) months before everyone else.
Fiddle collections
Sort and categorize your Fiddles into multiple collections.
Private collections and fiddles
You can make as many Private Fiddles, and Private Collections as you wish!
Console
Debug your Fiddle with a minimal built-in JavaScript console.