After page refresh it should be show the initial content of the page

158 Views Asked by At

In my html website i used Fullpage.js, so i have a four pages so whenever i click home page to other inner page, initially it showing the center section. but it should be show initial page of the content.

how to do this? Actuallay barba.js also i used. This is my barba code where i used my website;

 $('document').ready(function(){
      //initIndexJs();
      var transEffect = Barba.BaseTransition.extend({
        start: function(){
          this.newContainerLoading.then(val => this.fadeInNewcontent($(this.newContainer)));
        },
        fadeInNewcontent: function(nc) {
          nc.hide();
            var _this = this;
              $(this.oldContainer).fadeOut(1000).promise().done(() => {
                nc.css('visibility','visible');
                  nc.fadeIn(1000, function(){
                    _this.done();
                    })
                  });
                },
              });
              Barba.Dispatcher.on('transitionCompleted', function(currentStatus, oldStatus, container) {
                initIndexJs();
                //callForPageLoad();
        });
        Barba.Pjax.getTransition = function() {
          return transEffect;
        }
        Barba.Pjax.cacheEnabled = false;
        Barba.Pjax.start();
    });`
0

There are 0 best solutions below