However, Dustin Diaz's blog gave me the solution after a quick Google.
This resulted in the following code:
<script type="text/javascript">
function switchDiv(obj)
{
var el = document.getElementById(obj);
if ( el.style.display != 'none' ) {
el.style.display = 'none';
}
else
{
el.style.display = '';
}
}
</script>
<div id="whatever" style="margin-bottom:2px;"><a onclick="switchDiv('nameofdivtoshowandhide');"><img src="imageonwebsite" </a></div>
<div id="nameofdivtoshowandhide" style="margin-bottom:2px; display: none;"><img src="imagewithalllogos.jpg" </div>
This is definitely repeatable code, which I should save for future use.
No comments:
Post a Comment