Ajax.Navigation provides a variety of callback functions. All callbacks have to be defined inside the init function. e.g:
$(".ajax_follow").ajaxNavigation({ areas : "#ajax_content", afterInsertNewContent: function(){ alert("Insert was successfull."); }, afterTransitionEnd: function(){ alert("All animations are finished."); } });
beforeInit
Executed before ajaxNavigation is initiated. Code example $(".ajax_follow").ajaxNavigation({ areas : "#ajax_content", beforeInit: function(){ / do some stuff } }); |
beforeLoadContent
Executed after selector is clicked but before the ajax call is done. Code example $(".ajax_follow").ajaxNavigation({ areas : "#ajax_content", beforeLoadContent: function(){ / do some stuff } }); |
beforeInsertNewContent
Executed after the content is loaded but before it is inserted. Code example $(".ajax_follow").ajaxNavigation({ areas : "#ajax_content", beforeInsertNewContent: function(){ / do some stuff } }); |
afterInsertNewContent
Executed after the content is inserted but before the animation is started. Code example $(".ajax_follow").ajaxNavigation({ areas : "#ajax_content", afterInsertNewContent: function(){ / do some stuff } }); |
afterTransitionEnd
Executed after all animations are finished. Code example $(".ajax_follow").ajaxNavigation({ areas : "#ajax_content", afterTransitionEnd: function(){ / do some stuff } }); |
noContentChange
Executed if no changes were made to the areas. Code example $(".ajax_follow").ajaxNavigation({ areas : "#ajax_content", noContentChange: function(){ / do some stuff } }); |