PDA

View Full Version : Onclick Image Layer?



contigoni
07-11-2005, 07:18 PM
I'm a js noob and I've been trying to figure out a way to have an image appear on a new layer by way of an "onclick" event on the image's thumbnail image, then disappear on the next click--similar to what the tool-tip code available here does, but on mouse clicks, not on mouse-over/mouse-out.

I've tried Frankensteining together various things from different scripts, but I am in way over my head.

I don't care if the new layer image is draggable; don't need it to be. I don't need an "offset" from the mouse, or from the thumbnail being clicked on. In fact, I'd like the new image layer to be anchored to an upper left or right corner of the clicked thumbnail (depending on which side of page it's closest to).

Am I asking too much? If anybody can help me I'd be grateful.

contigoni

jscheuer1
07-12-2005, 12:01 PM
http://www.dynamicdrive.com/dynamicindex4/thumbnail2.htm

contigoni
07-13-2005, 08:22 PM
http://www.dynamicdrive.com/dynamicindex4/thumbnail2.htm

Thanks. I can't discuss DD scripts in here so if this goes further I'll start a new thread in appropriate forum, but that doesn't create a new layer over the thumbnail as I've been trying to do; it requires defined space on the same layer to reveal the image, and therefore displaces other elements on that layer.

jscheuer1
07-13-2005, 09:12 PM
http://www.dynamicdrive.com/dynamicindex4/thumbnail.htm

The above script should be able to be tweaked to put the pop-up in a defined region of the window rather than near the image or centered (it's current two options).

contigoni
07-14-2005, 10:35 PM
Thanks very much. It's close, and I'm experimenting with tweaks. :rolleyes: :eek: