JSFiddle - React, Tailwind, and code Playground

by Yaroslav Ivanov

HTML

<div></div>

CSS

div {
  width: 100px;
  height: 100px;
  background: #0f0;
}

JavaScript

var count = 0;

$("div").on("click", function() {
	if (count == 4) {
  	count = 0;
    $(this).html("С Новым годом!")
  } else {
		$(this).empty();
  	count++;
  }
  
})