K
K
Konstantin2020-06-20 10:52:50
JavaScript
Konstantin, 2020-06-20 10:52:50

Organize smooth reloading of pages using Barba.js?

Good day.
I'm trying to organize a smooth reload of pages with transition effects.
For these purposes, I chose the Barba.js script.
Faced a problem, after refreshing the page, other scripts (Carousel, animations) stop working.
Apparently, the scripts for executing these scripts are violated and they need to be updated, but I haven’t figured out how to do this yet.

Code example:

<html>
<head>
  <script src="/js/jquery-3.5.0.min.js"></script>	
</head>

<body>
</body>

<!-- Barba load paje -->
<script src="https://_unpkg.com/@barba/core"></script>

<!-- Animation Aos -->
<script src="/js/aos_animate.min.js"></script>

<!-- All.js -->
<script src="/js/all.js"></script>

<!-- Swiper JS -->
<script src="../js/swiper.min.js"></script>

<script>
   // Barba.j
   barba.init();

    // Animation
    AOS.init();
   
    // Slider
   var swiper = new Swiper('.swiper-slider');
</script>

</html>

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question