JSFiddle - React, Tailwind, and code Playground

by dascritch

HTML

<details>
    <summary>Hello World</summary>
    <p>
        <a href="#" id="test">This link should close summary</a>
    </p>
    
    
</details>

JavaScript

$(function(){
    $('#test').on('click',function(){
        $('details').removeProp('open')
    });
});