vForums Support > Programming & Coding :: Database of Codes/Hacks/Mods :: > Show/Hide
Show/Hide - Posted By Michael (wrighty) on 17th Apr 08 at 10:16pm
This is a snippet
function toggle(id){
id.style.display = (id.style.display == '')? 'none' : '';
}
This code is the very basic show/hide. Two examples below on how to hide something with an id of rawr.
toggle(document.getElementById('rawr'));
toggle(get('rawr','id'));
The second uses the function that vF has built in, but in essence does exactly the same.
Enjoy.