JSFiddle - React, Tailwind, and code Playground

HTML

<script src="https://code.jquery.com/jquery-2.1.4.min.js"></script>
<table border=1>
    <tr>
        <td>
            Information
        </td>
        <td onClick="toggleInfo()">
            <div id="information" style="display:none">
                More information that I want to select without hiding
            </div>
            <div id="clicktoshow">
                Click to show info
            </div>
            
        </td>
    </tr>
</table>

JavaScript

function toggleInfo() {
    var selection = window.getSelection();
    console.log(selection);
    if(selection.type != "Range") {
 		$("#clicktoshow").toggle();
    	$("#information").toggle();
    }
}