JSFiddle - React, Tailwind, and code Playground

by NickU

HTML

<!DOCTYPE html>
<html>
  <head>
    <meta charset="utf-8">
    <title>Drug test</title>
  </head>
  <body>

	<div id="div_1"></div>
	<div id="div_2"></div>
		
  </body>
</html>

CSS

#div_1 {
	position: absolute;
	height: 100px;
	width: 100px;
	top: 120px; 
	left: 80px;
	background-color: #2EFE64;
  -webkit-user-select: none;
  user-select: none;
}

#div_2 {
	position: absolute;
	height: 100px;
	width: 100px;
	top: 120px; 
	left: 300px;
	background-color: #2E9AFE;
  -webkit-user-select: none;
  user-select: none;
}

JavaScript

console.log("Hi all");

var div_1 = document.getElementById("div_1");
var div_2 = document.getElementById("div_2");



document.documentElement.addEventListener("mouseup", unShowSmth2);

function showSmth(e) {
	console.log(e.target.id + " is showing something great");
}

function unShowSmth0(e) {
	console.log(e.target.id + " 0 stops showing something great");
}
function unShowSmth1(e) {
	console.log(e.target.id + " 1 stops showing something great");
}
function unShowSmth2(e) {
	console.log(e.target.id + " 2 stops showing something great");
}