Skip to content
This repository was archived by the owner on Nov 19, 2024. It is now read-only.

Commit b35fa83

Browse files
authored
Merge branch 'master' into small_changes
2 parents 8196623 + 9032da8 commit b35fa83

File tree

1 file changed

+23
-0
lines changed

1 file changed

+23
-0
lines changed

guides/v2.1/javascript-dev-guide/widgets/widget_collapsible.md

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -513,9 +513,32 @@ $("#element").collapsible("forceDeactivate");
513513
### `beforeOpen callback` {#c_beforeOpen}
514514
Called before the content is opened.
515515

516+
Example of adding a callback to `beforeOpen` events:
517+
518+
```javascript
519+
$("#element").on("beforeOpen", function () {
520+
// do something before opening the content
521+
});
522+
```
523+
516524
### `dimensionsChanged` {#c_dimensionsChanged}
517525
Called after content is opened or closed.
518526

527+
Example of adding a callback to `dimensionsChanged` events:
528+
529+
```javascript
530+
$("#element").on("dimensionsChanged", function (event, data) {
531+
var opened = data.opened;
532+
533+
if (opened) {
534+
// do something when the content is opened
535+
return;
536+
}
537+
538+
// do something when the content is closed
539+
});
540+
```
541+
519542
#### Code sample
520543

521544
The following example shows how to initialize the collapsible widget and pass options during the initialization.

0 commit comments

Comments
 (0)