lokesh / lightbox2

THE original Lightbox script (v2).
http://lokeshdhakar.com/projects/lightbox2/
MIT License
6.22k stars 1.77k forks source link

Images starting at last #509

Closed gpeth398 closed 8 years ago

gpeth398 commented 8 years ago

I used your tutorial and got ligthbox2 to work on my website. However, it loads my last image first. So when I click on the link it will start at image 4 of 4. I have read other posts with this issue, but am having a hard time making sense of them. I have attached an image of my code, can you help me out?

capture

Huberttao commented 8 years ago

What browser do you use

gpeth398 commented 8 years ago

using google chrome

Huberttao commented 8 years ago

Could you describe the problem more specific?

gpeth398 commented 8 years ago

I am making a portfolio website to show my school projects and I would like to have a main image for each project, that will open a lightbox for all the other images of that project. Right now when I click on the image link it goes straight to image 4 of 4 instead of opening image 1 of 4. All the images are there, but I have to click backwards to see image 3,2, and 1.

Huberttao commented 8 years ago

Which version of the lightbox you are using now? you can try to reverse the two code. lightbox.js : 381line preloader.src= this.album[imageNumber].link; 382line this.currentImageIndex = imageNumber; Reverse the two code like this: lightbox.js : 381line this.currentImageIndex = imageNumber; 382line preloader.src= this.album[imageNumber].link;

gpeth398 commented 8 years ago

I am currently using version 2.8.2. I tried reversing the two lines around but there was no change.

Huberttao commented 8 years ago

Do you use Bootstrap in your program?

gpeth398 commented 8 years ago

yes i do

Huberttao commented 8 years ago

Your Tag is missing ">" . Bootstrap and lightbox are not compatible , I think ...

Huberttao commented 8 years ago

Your a Tag is missing ">" .

gpeth398 commented 8 years ago

Can you be more specific? Which line and where should ">" be?

Huberttao commented 8 years ago

image Inside the picture.

Huberttao commented 8 years ago

a tag

gpeth398 commented 8 years ago

i figured it out:) thanks for the help!

Huberttao commented 8 years ago

No need to thank!

lokesh commented 8 years ago

Closing out old issues.

Good to see the situation resolved. Team work! 👍