The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums JavaScript Help me make this more efficient (lightbox)

  • This topic is empty.
Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
  • #145768

    Hello, I am working on a lightbox and it is working so far however, I am trying to make it a little less bloated.

    Right now as you ca see it has anchor with an id, and it performs the lightbox animation on the div with the same id. The only problem is, if I have twenty or thirty preview images, I will also have twenty or thirty div with images inside them as well.

    I was thinking of having one “box” div and when you clock on the anchor, it will add that image to the “box” div, does that make sense?

    Any other insights are very welcome, and I appreciate the help very much.

    Thank you!


    Sorry for double post but does anyone have any thoughts?

Viewing 2 posts - 1 through 2 (of 2 total)
  • The forum ‘JavaScript’ is closed to new topics and replies.