JSFiddle - React, Tailwind, and code Playground

by Vaibhav Katole

HTML

<a href="#" class="clickMe">ShowDetials</a>

JavaScript

$(.clickMe).click(function(){
    alert($(this).text());
    if ($(this).text() == 'show') {
        
        $(this).text("hide")
    }
    else {
        
        $(this).text("show")
    }
});