JSFiddle - React, Tailwind, and code Playground
HTML
<div id="extra">This is the answer to the FAQ question</div>
<div id="checkme">This is the question</div>
JavaScript
$(document).ready(function () {
//Hide div w/id extra
$("#extra").css("display", "none");
// Add onclick handler to checkbox w/id checkme
$("#checkme").click(function () {
// If checked
if ($("#checkme").is(":checked")) {
//show the hidden div
$("#extra").show("fast");
} else {
//otherwise, hide it
$("#extra").hide("fast");
}
});
});