You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Feb 17, 2023. It is now read-only.
Copy file name to clipboardexpand all lines: README.md
+11-9
Original file line number
Diff line number
Diff line change
@@ -26,7 +26,7 @@ Fork or [download at jslightbox.felixhagspiel.de](http://jslightbox.felixhagspie
26
26
27
27
## Demo
28
28
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)
30
30
31
31
## Usage
32
32
@@ -181,12 +181,14 @@ Function that is executed when the lightbox is resized.
181
181
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.
182
182
183
183
### `{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:
0 commit comments