Closed Thread Icon

Preserved Topic: nice easy effect (Page 1 of 1) Pages that link to <a href="https://ozoneasylum.com/backlink?for=18034" title="Pages that link to Preserved Topic: nice easy effect (Page 1 of 1)" rel="nofollow" >Preserved Topic: nice easy effect <span class="small">(Page 1 of 1)</span>\

 
911
Paranoid (IV) Inmate

From: Stuttgart, Germany
Insane since: Apr 2001

posted posted 07-10-2001 15:20

hi all!

i found this nice effect: http://www.sebastianpfeiffer.de/hossa/test.html

is something simmilar in netscape possible to do?





Slime
Lunatic (VI) Mad Scientist

From: Massachusetts, USA
Insane since: Mar 2000

posted posted 07-10-2001 16:28

*Sort* of.

You're changing the display to "none" or "block". (Er, actually, you're using "none" or "", but I think "block" is the default, so it works out anyway.) Netscape doesn't support display.

However, what both netscape and IE support is visibility. Set it to "hidden" or "visible" for IE, or "hide" or "show" for NN.

The difference between display and visibility, is that if there's text after the hidden object, hiding it the display way will make the text come up to fill the space it was in. Hiding it the visibility way doesn't make the other text move at all.

Hope that helps.

lallous
Paranoid (IV) Inmate

From: Lebanon
Insane since: May 2001

posted posted 07-10-2001 16:33

yes, sure...
Don't r

code:
This is for IE
function showMore(layer){
layer.style.display = (layer.style.display == "none" ) ? "" : "none";
}

try this for netscape:

function showMore(layer){
if (layer.visibility == "hidden")
layer.visibility = "visible";
else
layer.visibility = "hidden";
}

btw, for such effect only it's nicer to use innerHTML like (IE only, guys what's NS equivalent?)

<a id="a1" onclick="document.all.a1.innerHTML='hiiiiii';">aaaaaaaaaaa</a>



Slime
Lunatic (VI) Mad Scientist

From: Massachusetts, USA
Insane since: Mar 2000

posted posted 07-10-2001 16:57

Those two functions aren't quite identical... as I said, display and visibility do slightly different things. Replace the IE function with this to make them do the same things:

function showMore(layer)
{
layer.style.visibility = (layer.style.visibility == "visible" ) ? "hidden" : "visible";
}

And that NN function *won't* work, since in NN 4.x, although you can *set* visibility to "hidden" or "visible", and NN will understand, you can't *test* it against "hidden" or "visible", you must use "hide" and "show". So use this for NN 4.x:

function showMore(layer)
{
layer.visibility = (layer.visibility == "show" ) ? "hide" : "show";
}

911
Paranoid (IV) Inmate

From: Stuttgart, Germany
Insane since: Apr 2001

posted posted 07-10-2001 17:07

sorry! i did a mistake. plz look at the example again. http://www.sebastianpfeiffer.de/hossa/test.html
i meant the text whish moves down when the first layer is shown.

p.s.: i know showing and hiding layers. ;-)




[This message has been edited by 911 (edited 07-10-2001).]

Slime
Lunatic (VI) Mad Scientist

From: Massachusetts, USA
Insane since: Mar 2000

posted posted 07-10-2001 17:12

Yeah, as for the text moving down, that's not easily doable in NN. I've only found one way to do it. Put the entire peice of text in one large DIV tag, and rewrite the DIV tag every time one of the links is clicked on, including or excluding peices that you want to be visible or invisible.

Unfortunately, this can be pretty inconvenient... but NN just doesn't correctly support the display thingy.

mr.maX
Maniac (V) Mad Scientist

From: Belgrade, Serbia
Insane since: Sep 2000

posted posted 07-10-2001 19:05

As said above display property doesn't exist in Shitscape 4. More info about this can be found at the following web site: http://www.xs4all.nl/~ppk/js/index.html (sections: "DHTML/Navigation: display" and "Archives/Old Display script")...

« BackwardsOnwards »

Show Forum Drop Down Menu