Skip to content

Commit 219c8d8

Browse files
authored
Add update content
1 parent 9c99fe2 commit 219c8d8

1 file changed

Lines changed: 21 additions & 0 deletions

File tree

README.md

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,27 @@ And the result will be:
7171

7272
![](https://i.imgur.com/OW6iYoY.png)
7373

74+
## Dynamically inserted content
75+
76+
If you insert content dynamically after calling the plugin, just call the "update" method.
77+
78+
```
79+
$instance = $('#gallery').lbtLightBox({
80+
qtd_pagination: 6,
81+
pagination_width: "160px",
82+
pagination_height: "160px",
83+
custom_children: ".box img",
84+
captions: true,
85+
captions_selector: ".caption p",
86+
});
87+
88+
~ some content ~
89+
90+
$instance.update();
91+
92+
```
93+
94+
7495
## Copyright and license
7596

7697
Code released under the [MIT license](https://github.com/jeankassio/LBT-Lightbox/blob/main/LICENSE).

0 commit comments

Comments
 (0)