| 1 | --- |
| 2 | title: "htmx:after:init" |
| 3 | description: "After an element is fully initialized" |
| 4 | --- |
| 5 | |
| 6 | The `htmx:after:init` event fires after an element has been fully initialized and all event listeners have been attached. |
| 7 | |
| 8 | ## When It Fires |
| 9 | |
| 10 | After htmx has completely set up an element with all its behaviors, triggers, and event listeners. |
| 11 | |
| 12 | ## Event Detail |
| 13 | |
| 14 | Empty - no additional context provided. |
| 15 | |
| 16 | ## Example |
| 17 | |
| 18 | ```javascript |
| 19 | htmx.on('htmx:after:init', (evt) => { |
| 20 | console.log('Element ready:', evt.target); |
| 21 | // Element is fully initialized and ready for interaction |
| 22 | }); |
| 23 | ``` |
| 24 | |
| 25 | The element is fully ready for htmx interactions at this point. |