JSFiddle - React, Tailwind, and code Playground

HTML

<div class="container">

</div>

JavaScript

$(document).ready(function() {
    
$( '.container' ).prepend( '<span class="HTML">&#9650;</span>' );
$( '.container' ).prepend( '<span class="Text">initial</span>' );

$( '.HTML' ).on( 'click', function() { 
    
    $( this ).html( $( this ).html() == '&#9650;' ? '&#9660;' : '&#9650;' );

} );
    
$( '.Text' ).on( 'click', function() { 
    
    $( this ).html( $( this ).html() == 'initial' ? 'switched' : 'initial' );

} ); 
});