JSFiddle - React, Tailwind, and code Playground

by Scott Kaye

JavaScript

console.clear();
console.log(document.readyState);

//Loads
document.addEventListener("domcontentloaded", function() {
    console.log("The DOM is done loading");
});

document.addEventListener("load", function() {
    console.log("The entire document is done loading");
});

$(function() {
    console.log("jQuery is loaded and the DOM is ready");
});

//Get JSON + parse (with jQuery)
$.ajax({
    url: "https://dl.dropboxusercontent.com/u/14593498/stuff.json",
    dataType: "json",
    success: function(data) {
        console.log(typeof data, data);
    }
});

//Geolocation
navigator.geolocation.getCurrentPosition(function(loc) { 
    console.log(loc);
}, function() {
    console.log("Location info was denied");
});