JSFiddle - React, Tailwind, and code Playground

by Peony Gerochi

HTML

<body>

        <p class="red q1">Test</p>
        <p class="red q2">Test</p>
        <p class="red q3">Test</p>
        <p class="red q4">Test</p>
        <p class="red q5">Test</p>
        <p class="red q6">Test</p>
      
      <div class="next-step">Next Step</div>
        <span></span>

    </body>

CSS

.next-step {
display: none
}

JavaScript

$(document).ready(function() {
         
    


     
$('.fuck').click(function() {
    $('.fuck').remove();
      var n = $(".red").length;
     $('this').removeClass('red')    
         
         if ($(".red").length<2)
  {
   $('.WHAT').show();
  }
          $("span").text("There are " + n + " divs." +
                     "Click to add more.");

    
});
         
         $('.you').click(function() {
    $('.you').remove();
               var n = $(".red").length;
              $('this').removeClass('red')   
          $("span").text("There are " + n + " divs." +
                     "Click to add more.");

});
     
         

         
     });