JSFiddle - React, Tailwind, and code Playground

by smlombardi

HTML

<div class="hs" id="hs1">&nbsp;</div>

CSS

.done {
          background-color: #ff0;
          border: 1px solid #ff0000;
        }

        .hs {
          background-color: none;
        }

        #hs1 {
          position: absolute;
          width: 200px;
          height: 200px;
          top: 100px;
          left: 100px;
        }

JavaScript

$(function(){
                $('#hs1').click(function(){
        
                    $(this).removeClass('hs');
                    $(this).addClass('done');
                    
                });


            });