📜 ⬆️ ⬇️

Lightbox JS v2.0

Lightbox JS is a simple JS script that displays images on the current page. Easy and fast customizable and works in all modern browsers.

Lightbox JS v2.0


How to connect
')
1) Lightbox uses the Prototype Framework and Scriptaculous JS libraries.

You must include the following three files in the page header:

<script type = "text / javascript" src = "js / prototype.js"> </ script>
<script type = "text / javascript" src = "js / scriptaculous.js? load = effects"> </ script>
<script type = "text / javascript" src = "js / lightbox.js"> </ script>

2) Connect Lightbox CSS file

<link rel = "stylesheet" href = "css / lightbox.css" type = "text / css" media = "screen" />

3) Check in CSS file links prev.gif next.gif.

In addition, make sure that the links to the loading.gif and close.gif files are correctly spelled out in the lightbox.js file.

How to use

1) Add the rel = “lightbox” attribute of the link tag (“a”) to activate the Lightbox. Example:

<a href=legimages/image-1.jpg rel= video light

Options: use the title attribute if you want the image to have a caption.

2) If you have a group of thumbnails that need to be grouped, you must additionally include in the attribute rel - the name of the group in square brackets. Example:

<a href= graphic pictures / image-1.jpg rel rel shadow light retang en image # 1 </a>
<a href= graphic pictures / image-2.jpg rel rel back lightinglight # image <2 </a>
<a href= graphic images/image-3.jpg rel rel shadowlight retang en image # 3 </a>

Download Lightbox JS

Official site www.huddletogether.com/projects/lightbox2

Source: https://habr.com/ru/post/3601/


All Articles