Jump to content
Sign in to follow this  
RawrRawrRob

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

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.

Share this post


Link to post
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 :/

Share this post


Link to post
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.

Share this post


Link to post
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

Share this post


Link to post
Share on other sites

It looks like imgs is undefined, there are also some display issues in Chrome. Your browser's developer console will show error messages like that for Javascript.

Share this post


Link to post
Share on other sites
It looks like imgs is undefined, there are also some display issues in Chrome. Your browser's developer console will show error messages like that for Javascript.
Thank you for the help! I finally got the buttons working properly!

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
Sign in to follow this  

×
×
  • Create New...