Page Render
- Triggered when a page has completed rendering
- Only runs once per page load - consider view render event listeners if you want your code to execute every time a form view is reloaded after submission, for example.
// Change "scene_1" to the scene you want to listen for
$(document).on('knack-scene-render.scene_1', function(event, scene) {
// Do something after the scene renders
alert('listener for scene: ' + scene.key);
});
Events
Event | Description |
---|---|
knack-scene-render.any | Triggered by all pages |
knack-scene-render.scene_1 | Triggered by a single scene specified by key |
Parameters
Parameter | Description |
---|---|
page | a JSON object of the scene and views it contains |
Updated about 4 years ago
What’s Next