JSFiddle - React, Tailwind, and code Playground

HTML

<table>
    <tr>
        <td><b>Öppna</b></td>
    </tr>
</table>

CSS

tr:hover {
    background: blue;
    color: white;
    cursor: pointer;
}

JavaScript

$(document).ready(function () {
   $('b').click(function(e) {
		$('td').append('<div>Test<br /><br /><span>Stäng</span></div>');
   });
   $(document).on('click', 'span', function(e) {
		$('div').remove();
   });
});