vForums Support Banner


Visit vForums

 

Welcome Guest! Please Login or Register
vForums Support :: Programming & Coding :: Database of Codes/Hacks/Mods :: Show/Hide - View Topic
Topic Rating: *****
Printable View
Michael
Moderator
*****

[Avatar]
Recoding the future

Posts: 4,043
Status: Offline
Gender: Male
Location: UK
Joined:  

Additional Groups:
Coding Team
***


Reputation: 58%  


pmtwittervForum
Show/Hide (17th Apr 08 at 10:16pm UTC)
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.
 Printable View

All times are GMT+0 :: The current time is 6:29pm
Page generated in 0.2404 seconds
This Forum is Powered By vForums (v2.4)
Create a Forum for Free | Find Forums