How to make owl carousel using external javascript files without node module

43 Views Asked by At

I already made owl carousel from origin template without node_module 'react-owl-carousel'. But now I sometimes see errors such as not adding owl-item class when loading pages. I imported javascript files like owl-carousel.min.js using node-module 'react-helmet'.

How can I fix that errors completely? Please feel free to answer me about that question.

<Helmet>
    <script src='/js/owl-carousel.min.js' />
</Helmet>

2

There are 2 best solutions below

0
Omar Zaynuhum On BEST ANSWER

So your using ReactJS and importing owl-carousel.min.js ? as a file am i correct to avoid node modules and dependency issues , initially i would like to inform you that OwlCarousel-githubis deprecated, which means its no longer supported by the developer and second of all using the owl-carousel.min.js is just a minified version of the library the creators recommend using tinyslider

  • Also i wanted to mention including a library or a min.js is still a pacakge you would use the difference is you have the file on the project not imported from a cloud delivery network or as an actual file like owl carousel example

    owlcarousel/
      ├── assets/
      │   ├── owl.carousel.css
      │   ├── owl.carousel.min.css
      │   ├── owl.theme.default.css
      │   ├── owl.theme.default.min.css
      │   ├── owl.theme.green.css
      │   ├── owl.theme.green.min.css
      │   └── owl.video.play.png
      │
      ├── owl.carousel.js
      ├── owl.carousel.min.js
      ├── LICENSE-MIT
      └── README.md
    

Docs - Owl Carousel

 <script src="jquery.min.js"></script>
        <script src="owlcarousel/owl.carousel.min.js"></script>

Screenshot from github

0
Dmytro Antonovych On

You can import javascript and css files in index.html from github owl-carousel repository.