[英]SmoothState Callbacks not firing
我正在为Web应用程序使用SmoothState,但是由于某些原因,大多数回调选项似乎根本无法触发。 似乎经历的唯一回调选项是onStart。
这是我的代码:
;(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);
难道我做错了什么?
我有同样的问题(但仍然没有解决)。 但是从文档来看,它应该是(没有渲染):
onAfter: function($container, $newContent) {}
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.