JSFiddle - React, Tailwind, and code Playground
HTML
<ul>
<li>
Security
<p class="hide">Nulla pharetra facilisis ligula sed ultricies.</p>
</li>
<li>
Scalability
<p class="hide">Nulla pharetra facilisis ligula sed ultricies.</p>
</li>
</ul>
JavaScript
$( function()
{
$( 'p.hide' ).toggle();
$( 'li' ).click( function()
{
$( this ).find( 'p.hide' ).fadeIn( 1000 );
$( this ).find( 'p.hide').removeClass("hide").addClass("show");
} );
} );
$( function()
{
$( 'p.show' ).toggle();
$( 'li' ).click( function()
{
$( this ).find( 'p.show' ).fadeOut( 1000 );
$( this ).find( 'p.show').removeClass("show").addClass("hide");
} );
} );