Thanks for your reply. It gave me hope that I could get it going. It didn't work. So, looking through the code, I came to the conclusion that it hinged on the id, so I did this:
Code:
<span id="image1-title" onClick="sweepToggle()" style="cursor:hand; cursor:pointer; color: rgb(102, 51, 102);"><u>355 nm</u>,</span>
The sweepToggle function argument is irrevelant; the control is all in the id. Just to clean the post up for those who want to use this on images as well, the <div> is like this:
Code:
<div id="image1" class="switchimage" style="border: 0px;" align="left" hspace="10" vspace="10"><img src="some.jpg" style="width: 600px; height: 450px;"></div>
I eliminated the onClick call to close the image because it cannot work: No id without a conflict. And the setup is this:
Code:
var image=new switchcontent("switchimage","div") //Limit scanning of switch contents to just "div" elements
image.setPersist(false)
image.collapsePrevious(false) //Multiple images open at any given time
image.init()
collapsePrevious is set to 'false' because I have multiple images, and the other declarations are not wanted.
Still wish I could close the image by clicking in it, but, so what.
Thanks for your help.
Bookmarks