JSFiddle - React, Tailwind, and code Playground

by tabalinas

HTML

<div id="test"></div>

CSS

#test { border: 1px solid red; width: 100px; height: 100px; }

JavaScript

$("#test").on("mousedown", function() {
    $("#test").css("background-color", "red");
});

$("#test").click(function() {    
    var c = 0;
    for(var i = 0; i < 1000000000; i++) {
        c++;
    }
    alert("Finished!");
});