css or javascript show/hide
css or javascript show/hide
Out of context: Reply #1
- Started
- Last post
- 10 Responses
- heavyt0
so, you want the menu to force all closed, then open 1, so that only one answer shows at a time?
easiest way is to traverse the DOM, and put all of the elements that you want to show/hide into an array.
eg. var elems = document.getElementsByTagName('p...
Then set a class to show the selected answer and hide others.
eg. for(i=0;i