Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Fading Layer Transitions with Scriptaculous

Status
Not open for further replies.

james6848

Technical User
May 10, 2004
23
GB
I'm currently designing a page using an effect from the great page.

What I'm trying to is pretty simple - just make a layer fade in when a button is pressed. There are a few of these layers, and the problem is that some layers will hide others.

Please click on the first two buttons on this page:

I know I can turn off each unwanted layer by name within the onclick event, but surely there is a more efficient way to do this with a variable?

Ideally I'd like to somehow pass the name of the previously viewed layer to a variable that can then be used within a 'fade' effect. E.g.:

<div onclick="new Effect.Fade('[VARIABLE]'); new Effect.Appear('NewLayer'); return false;" id="product1"></div>

I just don't have the knowhow to do this in practice!

This is doing my head in. :) Many thanks.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top