JSFiddle - React, Tailwind, and code Playground
by Simon Price
HTML
<span class="teaser">text goes here</span>
<span class="complete"> this is the
complete text being shown</span>
<span class="more">see more...</span>
CSS
.complete{
display:none;
}
.more{
color:navy;
font-size:13px;
padding:3px;
cursor:pointer;
}
JavaScript
$(".more").toggle(function(){
$(this).text("see less..").siblings(".complete").show();
}, function(){
$(this).text("see more..").siblings(".complete").hide();
});