JSFiddle - React, Tailwind, and code Playground

HTML

<h2 id="head1" class="head"> here is some interesting links </h2>
<a  class="aExpand" href="#">+</a>
 <ul class="sub" style="display:none;">
  <li>link 1</li>
  <li>link 2</li>
  <li>link 3</li>
 </ul>

JavaScript

$(function(){
    $(".aExpand").click(function(e){
       var item=$(this);  
        if(item.next("ul").is(":visible"))
        {         
          item.text("+").next("ul").hide();            
        }
        else
        {           
            item.text("-").next("ul").show();
        }        
    });    
});