JSFiddle - React, Tailwind, and code Playground

by BenjaminRay

HTML

<button id="btnUpdate">Update</button>
    <div class="type1">type 1</div>
    <div class="type1">type 1</div>
    <div class="type2 hidden">type 2</div>
    <div class="type2 hidden">type 2</div>

CSS

.hidden {
    display: none;
}

JavaScript

$(function () {
        $('#btnUpdate').on('click', function () {
            event.preventDefault();
            $('.type1').hide();
            $('.type2').show();
        });
    });