JSFiddle - React, Tailwind, and code Playground

HTML

<a href="#"><span>foo</span><span>bar</span></a>

CSS

a span:last-child {
    display: none;
}

JavaScript

$('a').click(function(){
    $(this).children('span').toggle();
    return false;
});