Jump to content

(RESOLVED) Problems With 'Back' and 'Next' Buttons in Lightbox


RawrRawrRob

Recommended Posts

It looks like it is a positioning issue, the two button divs are below the image. If you want them to be over the top of it then you'll probably want to use z-index to put them on a higher layer, and maybe relative positioning to position them relative to where they start.

Link to comment
Share on other sites

It looks like it is a positioning issue, the two button divs are below the image. If you want them to be over the top of it then you'll probably want to use z-index to put them on a higher layer, and maybe relative positioning to position them relative to where they start.
Thank you that worked! But I seem to have noticed another problem, when I click on either the back or next buttons, it displays the thumbnail for the corresponding image and not the large version :/
Link to comment
Share on other sites

Does that mean that getLargeIMG is not returning the correct name? You also have 2 images in the popup box, both the thumbnail and the large one. The document.querySelector("#box img") line is probably getting the thumbnail element, since that appears first in the box.

Link to comment
Share on other sites

Does that mean that getLargeIMG is not returning the correct name? You also have 2 images in the popup box, both the thumbnail and the large one. The document.querySelector("#box img") line is probably getting the thumbnail element, since that appears first in the box.
I got everything working! But now when you click on the next/back button, it doesn't go to the right image! link
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...