I'm using SmoothState for a web app, but for some reason, it appears most the callback options do not fire at all. The only callback option that seems to go through is onStart.
Here's my code:
;(function ($) {
'use strict';
var $body = $('html, body'),
content = $('#container').smoothState({
prefetch: true,
pageCacheSize: 10,
debug: true,
onReady: {
duration: 0,
render: function($container, $newContent) {
console.log('onReady');
$container.html($newContent);
window.initPlugins();
},
},
onAfter: {
render: function($container, $newContent){
console.log('onAfter');
window.initPlugins();
}
},
}).data('smoothState');
})(jQuery);
Am I doing something wrong?