I'm having a problem I have two vertical sliders on the same page that use the same template. My problem is the slider opens on OPEN and closes on CLOSE but it doesnt know which one to do since they are on the same page. Is there a way to change DIV IDs onClick?
Any help is appreciated!
Thank you,
RT
Code:
<div class="SliderTool_ViewDocs">
<div id="openbutton">
<a onclick="open$$TOKEN$$();">Open</a>
</div>
<div id="closebutton">
<a onclick="close$$TOKEN$$();">Close</a>
</div>
<script type="text/javascript">
function open$$TOKEN$$() {
var myDiv1 = document.getElementById("openbutton");
myDiv1.style.display = "none";
var myDiv2 = document.getElementById("closebutton");
myDiv2.style.display = "block";
}
function close$$TOKEN$$() {
var myDiv1 = document.getElementById("openbutton");
myDiv1.style.display = "block";
var myDiv2 = document.getElementById("closebutton");
myDiv2.style.display = "none";
}
</script>
</div>
Thank you,
RT