JSFiddle - React, Tailwind, and code Playground
HTML
<div class="container">
</div>
JavaScript
$(document).ready(function() {
$( '.container' ).prepend( '<span class="HTML">▲</span>' );
$( '.container' ).prepend( '<span class="Text">initial</span>' );
$( '.HTML' ).on( 'click', function() {
$( this ).html( $( this ).html() == '▲' ? '▼' : '▲' );
} );
$( '.Text' ).on( 'click', function() {
$( this ).html( $( this ).html() == 'initial' ? 'switched' : 'initial' );
} );
});