How to enlarge an image by clicking

Solved
lutchi-lutcho Posted messages 23 Status Membre -  
lutchi-lutcho Posted messages 23 Status Membre -
Good evening everyone,

I'm returning to a topic that has already been resolved, but which is not very well explained for beginners. https://forums.commentcamarche.net/forum/affich-11179466-agrandir-image-sur-clic
I have some basic knowledge in HTML, CSS, PHP, and SQL, and I would like to know how to enlarge an image by clicking on it.

The solution is offered by this blog: http://www.huddletogether.com/projects/lightbox2/

The problem I'm encountering, and I don't think I'm the only one, is that I don't know what to do after downloading the folder.
It says to load the file into our HTML page (How do you do this clearly?)

Could someone enlighten me and provide a clear "user manual"! :)
Let's say as a Christmas gift!

Thank you for your responses

Happy holidays to everyone!!

Lutchi-Lutcho

7 réponses

RAD ZONE Posted messages 5362 Status Contributeur 1 360
 
img
6
lutchi-lutcho Posted messages 23 Status Membre
 
I did as you instructed me RAD, and yes, it's better.
Now there is a link on the photo.
When I click on it, the image opens large but in another window.
It does not display in the same window with that kind of zoom and the site in the background, like in the example: http://www.huddletogether.com/projects/lightbox2/

What did I miss?

Here's a recap of what I did:
1- I downloaded the folder (On Mac, so not unzipped)
2- I placed the CSS, JS, and IMAGES folders (which I renamed IMAGES2) in my root site folder
3- I put the relevant photos in the IMAGES2 folder
4- I added the 3 lines of code in the Head:
<script src="js/jquery-1.10.2.min.js" type="text/javascript"></script>
<script src="js/lightbox-2.6.min.js" type="text/javascript"></script>
<link href="css/lightbox.css" rel="stylesheet" type="text/css" />

5- I included a lightbox in the chosen photo with the following code:
<a href="IMAGES/Saulalvarez.jpeg" data-lightbox="Saulalvarez" title="Saulalvarez"><img src=
"IMAGES/petite_Saulalvarez.jpeg" width="203" height="134" alt="img" /></a>

6- And there the image opened in a new tab.
0