nietodickens
New Member
Hello! I'm trying to make a Toggle function work on a website to hide/show text after click, but it's working the other way around: it shows the text and when you click it hides it, I want for it to be hidden and then show it! Anyone has any suggestions?
Here's the link so you can see it, scroll to "All You Can Learn Pass" and see it:
http://www.vlany.org/index.php#event
And here's the code I have:
<script type="text/javascript">
function WM_toggle(id){
var x = document.getElementById(id);
var display = "";
if (x.style.display == "none") {
display = "";
} else {
display = "none";
}
x.style.display = display;
}
</script>
<h1><a href="#event" onClick="WM_toggle('eventAYCLP'); return true" >
VLA's All You Can Learn Pass</a>
</h1>
<dd id="eventAYCLP">
<? require("dropdownmenus/descriptions/descrip_ayclp.php"); ?>
</dd>
<tr id="eventAYCLP" style="display:none">
</tr><hr />
THANKS!!
L