This is the first javascript code I have written, and I am having some trouble. I am in the process of making a vertical menu that will show additional information for the link onclick, while also hiding the contents of any other link. I want to add the .animate 'slow' javascript to the function, but having some difficulty. This is what I have:
<script type="text/javascript">
function reveal(id) {
var e = document.getElementById(id);
if(e.style.display== 'block')
e.style.display= 'none';
else
e.style.display= 'block';
e.style.opacity= '1';
}
</script>
<script type="text/javascript">
function hide(id) {
var e = document.getElementById(id);
if(e.style.display== 'block')
e.style.display= 'none';
else
e.style.display= 'none';
}
</script>
I have tried numerous ways to put the 'animate' tag in but can't seem to get it. Help is sincerely appreciated.