JSFiddle - React, Tailwind, and code Playground
HTML
<a href="#" onclick="$(this).toggleText('<strong>I got toggled!</strong>','<u>Toggle me again!</u>')"><i>Toggle me!</i></a>
CSS
a{text-decoration:none}
JavaScript
$.fn.extend({
toggleText:function(a,b){
if(this.html()==a){this.html(b)}
else{this.html(a)}
}
});