Skip to content
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
});

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.
Clone this wiki locally