-
Notifications
You must be signed in to change notification settings - Fork 588
Callback Events
gilshwartz edited this page Apr 27, 2012
·
8 revisions
Bind events directly to the loading/unloading of views like this:
$('#myview').on('pageAnimationStart', function(e, data) {
console.log(data.direction); // in or out
});
These functions are called before and after the animation sequence which navigates from one view to another.
Returns data
- data.direction 'in' or 'out';
- data.animation is a string representing the type of animation being used, like slideleft (default), cuberight, fade, slideup, etc.
Function called after a view is inserted into the DOM, typically via AJAX.
Returns data
- data.node is the DOM node that represents the new view.