0

So from the title itself. I already integrated a revolution-slider that is supplied by the theme I bought. It works fine and loads all the necessary scripts when I first load the page. However, the problem starts when I navigate to a different page like the contacts page. It loads the component well but when I go back to the page that displays the revolution slider, the necessary scripts for the slider does not work anymore. I have placed the revolution-slider scripts in the index.blade.html file. Here is my code.

Do you have any idea on how to load the slider again?

index.blade.html

<html lang="{{ str_replace('_', '-', app()->getLocale()) }}">
    <head>
    <tittle>
   <body class="stretched">
    <div id="app"></div>
    // revolution-slider script here
    ...
    <script type="text/javascript" src="{{ asset('public/slider/jquery.themepunch.tools.min.js') }}"> 
    </script>
   </body>
</html>

365体育足球滚球比分MainPage.js

import React, { useEffect } from 'react';  
import AppSlider from '@domain/main/AppSlider';
const MainPage = () => {
     return (
          <AppSlider />
     );
};

export default MainPage;

AppSlider.js

import React from 'react';

const AppSlider = () => {
   return (
      <section id="slider" className="slider-element full-screen slider-parallax">
           <div className="revslider" data-alias="sleek-landing-page" />
      </section>
   );
};
export default AppSlider;

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.