I am trying to use multiple instances of this little show/hide script for a definition list on the same page. However, the problem is that the definition list must be given an ID, and this can only be used once on a page.
http://www.tjkdesign.com/articles/toggle_elements.asp
How would I go about changing this to a class so that I could use it more than once on a page (i.e. multiple definition lists as opposed to one big one)?
I changed all of the getElementById to getElementByClass and it didn't seem to work. I have very little knowledge about Javascript, so any help would be very much appreciated.
Thanks in advance.
http://www.tjkdesign.com/articles/toggle_elements.asp
How would I go about changing this to a class so that I could use it more than once on a page (i.e. multiple definition lists as opposed to one big one)?
I changed all of the getElementById to getElementByClass and it didn't seem to work. I have very little knowledge about Javascript, so any help would be very much appreciated.
Thanks in advance.
Comment