JSFiddle - React, Tailwind, and code Playground

HTML

<p class="truncate">This is the whole string <a class="showMore">Show more...</a><span> pulled from my database.</span></p>

CSS

p.truncate span { display: none; }

JavaScript

$("a.showMore").on("click", function() {
    $(this).parent().find("span").contents().unwrap();
    $(this).remove();            
});