Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

101
Views
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
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!