
What's covered?This topic describes the original method devised by Rick Stone to whom credit goes for amending a script from Tommy Simmons. What I have done is demonstrate it and explain how to tweak it when there is more than one target in a particular topic. I have also amended the method so that it can be used with expanding text. |
Click this link to see the demo.
In the target file you need a javascript function for each target dropdown or expanding hotspot. For good order I have called them showEmMark1(), showEmMark2() etc.
The script from the target file for the links above is as below.
<script type="text/javascript" language=JavaScript1.2> var arrayofDivs = document.all.tags("DIV"); var arrayofSpans = document.all.tags("SPAN"); // FIRST FUNCTION function showEmMark1() { arrayofDivs[0].style.display = "block"; } if (window.location.hash.substring(1)=="First"){ setTimeout('showEmMark1()',500);} // SECOND FUNCTION function showEmMark2() { arrayofDivs[1].style.display = "block"; } if (window.location.hash.substring(1)=="Second"){ setTimeout('showEmMark2()',500);} // THIRD FUNCTION function showEmMark3() { arrayofSpans[0].style.display = "inline"; } if (window.location.hash.substring(1)=="Third"){ setTimeout('showEmMark3()',500);} </script> |
The points to note are: