showing and hiding multiple divs using JavaScript dynamically

youweroneiwy

New Member
Here I have four \[code\]td\[/code\]s which are clickable and I have four more \[code\]td\[/code\]s which have \[code\]id\[/code\]s and concerned data within them. I want to display data when concerned clickable \[code\]td\[/code\]s are clicked. This I want to do using JavaScript.Here is my JavaScript code:\[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'; };\[/code\]
 
Back
Top