/ Published in: JavaScript
toggle a div via JS/CSS style
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
function toggle(obj) { var el = document.getElementById(obj); el.style.display = (el.style.display != 'none' ? 'none' : '' ); }