RawrRawrRob Posted March 4, 2013 Share Posted March 4, 2013 (edited) Hello, I'm having trouble getting my back and next buttons in my lightbox to work! Any help will be greatly appreciated! http://imd.edumedia....term/index.html Edited March 6, 2013 by RawrRawrRob Link to comment Share on other sites More sharing options...
justsomeguy Posted March 4, 2013 Share Posted March 4, 2013 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 More sharing options...
RawrRawrRob Posted March 4, 2013 Author Share Posted March 4, 2013 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 More sharing options...
justsomeguy Posted March 4, 2013 Share Posted March 4, 2013 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 More sharing options...
RawrRawrRob Posted March 5, 2013 Author Share Posted March 5, 2013 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 More sharing options...
justsomeguy Posted March 5, 2013 Share Posted March 5, 2013 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. Link to comment Share on other sites More sharing options...
RawrRawrRob Posted March 6, 2013 Author Share Posted March 6, 2013 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! Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now