Let's say we have the following codes, which is used to display 10 images and we have 10 thumbnails through lightbox. Now our goal will be display only first image thumbnail and upon clicking on first image we can go backward and forward to display rest of the images.
The idea we need to make the first image to be loaded via tag and for rest of the images there will be no tag. So re writing my code as following.
The above code will work and it will display multiple images under one thumbnail. Since it is defined via the img tag, but the others have no content, but will still be parsed by the lightbox script.
In a nutshell, to make one thumbnail and multiple images write code in this way,
An important note is to follow the space and indentation as required. If you don't follow lightbox-2 code will not work.
The above code will work and it will display multiple images under one thumbnail. Since it is defined via the img tag, but the others have no content, but will still be parsed by the lightbox script.
In a nutshell, to make one thumbnail and multiple images write code in this way,
An important note is to follow the space and indentation as required. If you don't follow lightbox-2 code will not work.
No comments:
Post a Comment