Callback Events - senchalabs/jQTouch GitHub Wiki
Bind events directly to the loading/unloading of views like this:
$('#myview').on('pageAnimationStart', function(e, data) {
console.log(data.direction); // in or out
});
pageAnimationStart && pageAnimationEnd
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.
pageInserted
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.