Skip to content
This repository was archived by the owner on Feb 17, 2023. It is now read-only.

Commit 4ba7b4f

Browse files
committed
updated readme
1 parent da9e640 commit 4ba7b4f

File tree

1 file changed

+11
-9
lines changed

1 file changed

+11
-9
lines changed

README.md

+11-9
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ Fork or [download at jslightbox.felixhagspiel.de](http://jslightbox.felixhagspie
2626

2727
## Demo
2828

29-
You can watch it live at [jslightbox.felixhagspiel.de](http://jslightbox.felixhagspiel.de/) or on [felixhagspiel.de](http://felixhagspiel.de/)
29+
You can watch it live at [jslightbox.felixhagspiel.de](http://jslightbox.felixhagspiel.de/) or on [felixhagspiel.de](http://felixhagspiel.de/projects)
3030

3131
## Usage
3232

@@ -181,12 +181,14 @@ Function that is executed when the lightbox is resized.
181181
Function that is executed once the current image is loaded. The callback receives an event which is `"prev"` if the prev button was clicked, `"next"` if the next button was clicked or `false` for all other ways of opening the lightbox.
182182

183183
### `{onloaderror: function(event)}`
184-
Function that is executed when the current image fails to load. You can add your handlers here to display a warning or call other functions. The callback receives an event which is `"prev"` if the prev button was clicked, `"next"` if the next button was clicked or `false` for all other ways of opening the lightbox. This allows you to handle errors like this:
185-
186-
if(event === 'prev')
187-
lightbox.prev()
188-
else
189-
lightbox.next()
184+
Function that is executed when the current image fails to load. You can add your handlers here to display a warning or call other functions. The callback receives an event which is `"prev"` if the prev button was clicked, `"next"` if the next button was clicked or `false` for all other ways of opening the lightbox. This allows you to handle errors. For example you can just show the next or previous picture if the current one is not available:
185+
186+
onloaderror: function(event){
187+
if(event === 'prev')
188+
lightbox.prev()
189+
else
190+
lightbox.next()
191+
}
190192

191193
## Attributes
192194

@@ -237,10 +239,10 @@ Example:
237239
onload: function(){
238240
// ...
239241
},
240-
onresize: function(){
242+
onresize: function(event){
241243
// ...
242244
},
243-
onloaderror: function(){
245+
onloaderror: function(event){
244246
// ...
245247
}
246248
};

0 commit comments

Comments
 (0)