JSFiddle - React, Tailwind, and code Playground

HTML

<p id="my_text">If you click on the "Hide" button, I will disappear.</p>

<button id="hide">Hide</button>
<button id="show">Show</button>

JavaScript

$(document).ready(function(){
    // Скрываем текст и кнопку при загрузке страницы
    $('#my_text, #hide').hide();

    // Скрываем текст и кнопку при клике на кнопку "Hide"
    $('#hide').click(function(){
        $('#my_text, #hide').hide();
        $('#show').show();
    });

    // Показываем текст при клике на кнопку "Show"
    $('#show').click(function(){
        $('#my_text, #hide').show();
        $('#show').hide();
    });
});