Here I have four tds which are clickable and I have four more tds which have ids and concerned data within them. I want to display data when concerned clickable tds are clicked. This I want to do using JavaScript.
Here is my JavaScript code:
var _hidediv = null;
function showdiv(id) {
var div = document.getElementById(id);
div.style.display = 'block';
if(_hidediv)
_hidediv();
_hidediv = function () {
div.style.display = 'none';
};