|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
CSS/Javascript to hide a div in Firefox
Hello,
What I want to do is have the ability to hide a <div></div> with javascript. My current code works in IE but not in Firefox. Code:
<div id="profile" class="menus">
<strong>profile:</strong><br /><br />
<!-- profile info n' stuff -->
<div id="layouts">
<IMG SRC="<$Profile_Pic$>"><br /><br />
<$Profile_Info$><br />
</div>
</div> <!--- this is what I want to hide --!>
<div id="controls" class="menus">
<strong>controls:</strong><br>
profile:[<a href="#" onClick="profile.style.visibility='visible'">show</a>] [<a href="#" onClick="profile.style.visibility='hidden'">hide</a>]<br>
hit-counter:[show] [hide]<br>
mp3-player:[show] [hide]<br>
subscriptions:[show] [hide]<br>
blogrings:[show] [hide]<br />
</div>
That code works fine for IE but how can it be done in firefox? Thanks, jeff |
|
#2
|
|||
|
|||
|
RE: CSS/Javascript to hide a div in Firefox
you could borrow from this example.
|
|
#3
|
|||
|
|||
|
RE: CSS/Javascript to hide a div in Firefox
You must use getElementById() to get it working in Firefox.
Example: onClick="document.getElementById('profile').style.visibilit y='hidden'" Edit: I see I wasn't quick enough |
|
#4
|
|||
|
|||
|
RE: CSS/Javascript to hide a div in Firefox
Beautiful!
Thanks, jeff |
![]() |
| Viewing: Codewalkers Forums > Other Technologies > Client Side Things > CSS/Javascript to hide a div in Firefox |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|
|