View Full Version : Div layers, and drag layer script

12-13-2007, 09:52 PM

I have a page with two layers (in div tags). The bottom layer has an image which has a javascript drag script linked to it so that the user can drag the image around the page.
The layer above has a big rectangular gif with a transparent circle in the center, so that the image below shows as if looking through a circular hole.

Now the problem quite obviously is that with the layer on top, you can't drag the lower layer about anymore.

I've been trying to think/search for a way to get round it, but can't :confused:

Any advice is greatly appreciated,

12-13-2007, 10:56 PM
Perhaps set the z-index higher on hover?

12-14-2007, 09:09 AM
Hi, and thanks for the reply.

I need the z-index of the draggable layer lower than the masking gif file.
It's a "telescope view" simulator, where the picture in the lower layer is the object in space, and the big black gif with the transparent circle in the middle makes it look like the view with a telescope.

Is there any way to link the positions of two layers? So maybe I could have a blank layer with a higher z-index than both, which when dragged will move the bottom layer too?

Thanks again,