Results 1 to 5 of 5

Thread: Onclick Image Layer?

  1. #1
    Join Date
    Jul 2005
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Onclick Image Layer?

    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

  2. #2
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    30,495
    Thanks
    82
    Thanked 3,449 Times in 3,410 Posts
    Blog Entries
    12

  3. #3
    Join Date
    Jul 2005
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    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.

  4. #4
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    30,495
    Thanks
    82
    Thanked 3,449 Times in 3,410 Posts
    Blog Entries
    12

    Default

    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).
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

  5. #5
    Join Date
    Jul 2005
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Thanks very much. It's close, and I'm experimenting with tweaks.

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •