JSFiddle - React, Tailwind, and code Playground
HTML
<table>
<tbody>
<tr>
<td id="sohamMenu" valign="top" class="leftmenuBG">
<div id="soham" class="TA" style="width:210px; height:500px; overflow-x:scroll; overflow-y:scroll;">
<tiles:insert attribute="menupage" />
</div>
</td>
<td onclick="hideanddisplay()" class="productLogo" title="Click to Hide/Display Navigator"><span style="cursor:pointer">hiii <span style="color:#FFFFFF">gud morning</span></span>
</td>
</tr>
</tbody>
</table>
JavaScript
function hideanddisplay() {
var cookiewval = getMyCookie("status");
if (cookiewval == "hide") {
$("#sohamMenu").show();
document.cookie = "status=show;";
} else {
$("#sohamMenu").hide();
document.cookie = "status=hide;";
}
}
function getMyCookie(name) {
var prefix = name + "=";
var start = document.cookie.indexOf(prefix)
if (start == -1) {
return null;
}
var end = document.cookie.indexOf(";", start + prefix.length)
if (end == -1) {
1
end = document.cookie.length;
}
var tempString = document.cookie
var value = tempString.substring(start + prefix.length, end)
return unescape(value);
}