我在主页上创建了一个包含6个部分的网站,其中包含指向某些工作的链接。我试图像这样使用barba视图,但不起作用。我也有点新的
var Homepage = Barba.BaseView.extend({
namespace: 'project',
onEnter: function() {
// The new Container is ready and attached to the DOM.
},
onEnterCompleted: function() {
$.fn.fullpage.destroy();
// The Transition has just finished.
},
onLeave: function() {
// A new Transition toward a new page has just started.
},
onLeaveCompleted: function() {
$.fp.fullpage.reBuild();
// The Container has just been removed from the DOM.
}
});
// Don't forget to init the view!
Homepage.init();