Skip to content

Commit 44b065a

Browse files
committed
docs upd
1 parent a0298e3 commit 44b065a

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

docs/methods.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ Unbinds all events, and closes PhotoSwipe if it is currently open. Once the inst
3131

3232
```js pswpcode
3333
import PhotoSwipeLightbox from '/photoswipe/photoswipe-lightbox.esm.js';
34-
const lightbox = new PhotoSwipeLightbox({
34+
let lightbox = new PhotoSwipeLightbox({
3535
gallery: '#gallery--test-destroy',
3636
children: 'a',
3737
pswpModule: () => import('/photoswipe/photoswipe.esm.js'),
@@ -67,7 +67,7 @@ Open PhotoSwipe at a given index. Arguments:
6767
If you use `gallery` & `children` options and you omit the second argument (do not provide data source) - PhotoSwipe will use the first `gallery` element. To select another `gallery` element you must define data source as `{ gallery: HTMLElement }`, for example:
6868

6969

70-
<PswpCodePreview galleryID="with-button">
70+
<PswpCodePreview galleryID="with-button">
7171

7272
```js pswpcode
7373
import PhotoSwipeLightbox from '/photoswipe/photoswipe-lightbox.esm.js';
@@ -86,7 +86,7 @@ document.querySelector('#gallery--with-button').after(btn);
8686
btn.onclick = () => {
8787
// highlight-start
8888
lightbox.loadAndOpen(1, {
89-
gallery: document.querySelector('#gallery--test-destroy')
89+
gallery: document.querySelector('#gallery--with-button')
9090
});
9191

9292
// You also can just trigger the native click

0 commit comments

Comments
 (0)