JSFiddle - React, Tailwind, and code Playground

HTML

<h2>This is a heading</h2>

<p id="test">This is a paragraph.</p>
<p id="test">This is another paragraph.</p>

<input type="checkbox" id="s">Click me</button>

JavaScript

$(document).ready(function() {

$('#s').bind('change', function() {
    if ($("#s").is(':checked'))
      $("#test").hide(); // checked
    else
      $("#test").show();

  });
});