Hello, I am facing an issue with revealing the content in my "para2" div when the user clicks on the "more" image link.
I have previously used this code and it worked fine, but for some reason, it's not working now. Can someone please help me identify my mistakes? I'm still learning and would appreciate any guidance.
Thank you in advance!
<blockquote>
<p>
<a href="#para2"/>
<a href="#" onclick="return toggleMe('para2')" onfocus="#para2"/> <img src="images/more.gif" alt="" title="" border="0"></a>
<div id="para2" style="display:none">
The text I want to reveal
</div>
</p>
</blockquote>
Sorry,
<script type="text/javascript">
function toggleMe(a){
var e=document.getElementById(a);
if(!e)return true;
if(e.style.display=="none"){
e.style.display="block"
}
else{
e.style.display="none"
}
return true;
}
</script>