Quote:
Originally Posted by chasero13
I have the following script on a website:
|
Then lose it along with
javascript:,
language="javascript" and
<font>, all of which are unnecessary or deprecated.
Code:
<script type="text/javascript">
function toggle( targetId )
{
var elem = document.getElementById( targetId );
elem.style.display = ( elem.style.display == "none" ? "block" : "none" );
return false;
}
</script>
<a href="#" onclick="return toggle('Link1')">EXAMPLE</a>
<div id="Link1" style="display: none">
<div align="left"><font color="#4a4a4a" size="2" face="helvetica">Example only. Example only. Example only.
</div>
</div>