Skip to content

Commit 22569de

Browse files
authored
Update README.md
1 parent 3c4f7ee commit 22569de

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

README.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,15 +34,19 @@ composer require infinityloop-dev/lazy-component
3434
- File extension is simply swapped to `.latte`.
3535
- By default the FontAwesome 5 spinner is used as placeholder. Override `EMPTY_TEMPLATE` constant to use different empty template file.
3636

37-
### Example with tab and lazy tab content
37+
### Example lazy tab content
38+
39+
Tab header:
3840
```
3941
<li class"tab" data-load-component="{control myComponent:loadComponentLink}">Tab name</li>
4042
```
43+
Tab content:
4144
```
4245
<div class="tab-content">
4346
{control myComponent}
4447
</div>
4548
```
49+
JQuery ajax request on click:
4650
```
4751
$(".tab[data-load-component]").one('click',function (event) {
4852
const link = $(this).data("load-component");

0 commit comments

Comments
 (0)