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
});

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.
You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.
Press h to open a hovercard with more details.