JSFiddle - React, Tailwind, and code Playground

by suphalak_26

HTML

<span>Wealth Management</span>
<br>
<input type="button" id="addClass" value="Add Class"/>
<input type="button" id="removeClass" value="Remove Class"/>
<div>   
<input type="textbox" id="text1">
    </div>

CSS

.boldAndRed{
    color: #ff0000;
    font-weight: bold;
}

JavaScript

jQuery(function(){
    jQuery('#addClass').click(function(){
        jQuery('span').addClass('boldAndRed');
    });
    jQuery('#removeClass').click(function(){
        jQuery('span').removeClass('boldAndRed');
    });
    jQuery('#text1').val(jQuery('span').html());
});