JSFiddle - React, Tailwind, and code Playground

HTML

<input type="checkbox" value="checking">
<div class="box-container">
    <div class="box1">
        <a href="#" class="open-box">Show next box</a>
    </div>
    <div class="box2"></div>
</div>

CSS

.box-container {
    display:none;
}

.box1 {
   background-color:yellow;
    width:400px;
    height:100px;    
}

.box2 {
   background-color:red;
    width:200px;
    height:100px;
    display:none;
}

JavaScript

$('input[type="checkbox"]').click(function(){
    if($(this).attr("value")=="checking"){
    $(".box-container").toggle();
    }
});

$('.open-box').click(function() {
    $(".box2").slideToggle();
});