Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

104
Visualizações
Locomotive & owl carousel both are not working on innerpage after Barba.JS page transition

I have created a minimal demo and as you can see that inner page is not loading the JS and CSS of Locomotive and also OWL carousel if user clicks on heading text on homepage and navigate to inner page. But if user refresh the inner page then both locomotive & owl carousel are working fine. How to fix this? I have added the suggested change to the JS file (https://bootstrap-awesome.com/barba-test1f/js/main-test.js)

Any help would be highly appreciated.

Demo Link: https://bootstrap-awesome.com/barba-test1f/index-test.html

jQuery.noConflict();
(function($){


 function projdetailpage_leaveAnimation() {
    const tl = gsap.timeline();
    tl.to('.slide_head', 1, {y:'50%', opacity:0, ease: 'Power2.easeOut'});
    
    }

  function projdetailpage_enterAnimation() {
      const tl = gsap.timeline();
        tl.to('.slide_head h1', 1, {y:'-30%', ease: 'power4.out'});
     
    }

    barba.init({

 views: [{
    namespace: 'home',
    beforeEnter({ next }) {
      // Script URLs to load
      let pageScriptSrcs = [
        'https://cdn.jsdelivr.net/npm/locomotive-scroll@3.5.4/dist/locomotive-scroll.min.js',
        'js/custom-scroll.js',
        'js/owl/owl.carousel.js',
        'js/owl/owl-custom.js'
      ]
      
      pageScriptSrcs.forEach(scriptSrc => {
        let script = '<script src="' + scriptSrc + '"><\/script>';
        console.log(script);
        next.container.appendChild(script);
      })
    },
  }],


      transitions: [{
        name: 'projdetailpage transition',
        from: {
          namespace: ['home']
        },
        to: {
          namespace: ['projdetailpage']
        },
        enter() {
          projdetailpage_enterAnimation();
        },
        leave() {
          const done = this.async();
          projdetailpage_leaveAnimation();
          setTimeout(function() {
            done();
          }, 1000);
               
        }
        

      }]
    });

  })(jQuery) 
about 4 years ago · Juan Pablo Isaza
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda