Skip to content

Commit

Permalink
(docs) Update usage instruction with 'load' event note
Browse files Browse the repository at this point in the history
Resolves feimosi#214
  • Loading branch information
feimosi committed Mar 31, 2020
1 parent a5118d2 commit e130558
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,16 @@ where the first argument is a selector to a gallery (or galleries) containing `a

To use captions put a `title` or `data-caption` attribute on the `a` tag.

Note: if you import baguetteBox using the `<script>` tag, remember to run it after the document has loaded:

```html
<script>
window.addEventListener('load', function() {
baguetteBox.run('.gallery');
});
</script>
```

## Customization

You can pass an object with custom options as the second parameter.
Expand Down

0 comments on commit e130558

Please sign in to comment.