92
rated 0 times
[
97]
[
5]
/ answers: 1 / hits: 50197
/ 14 Years ago, sun, december 5, 2010, 12:00:00
I'm trying to do this without Jquery. I want to show a div when clicking a trigger. So far I have this to hide the element.
document.getElementById('element').style.display = 'none';
HTML..
<div class=element>Ahem, boo!!</div>
<a href=# id=showDiv>Show</a>
How do I create a function to show the div when clicking the link? I would like to avoid using functions like onclick=showDiv()
in the link itself.
More From » html