Company logo
  • Jobs
  • Bootcamp
  • About Us
  • For professionals
    • Home
    • Jobs
    • Courses
    • Questions
    • Teachers
    • Bootcamp
  • For business
    • Home
    • Our process
    • Plans
    • Assessments
    • Payroll
    • Blog
    • Calculator

0

93
Views
Is there any way i can change owl carousel autoplay direction in reactjs?

Currently both of these owl carousels move in the same direction (right to left). My code looks like this,I want one of these carousels to move in the opposite direction (left to right) on autoplay. I couldn't find anything in the documentations.

  const imageSlider = datajson.map((item) => {
    return (
      <div className="item cards">
        <img src={item.image} alt="" />
        <div className="body_text">
          <h5>{item.title}</h5>
          <p>{item.description}</p>
        </div>
      </div>
    );
  });

  return (
    <>
      <OwlCarousel
        className="owl-theme"
        loop
        margin={10}
        nav={false}
        autoplay={true}
        autoplayTimeout={2000}
        autoplayHoverPause={true}
        items={4}
        dots={false}
      >
        {imageSlider}
      </OwlCarousel>
      <br />
      <OwlCarousel
        className="owl-theme"
        loop
        margin={40}
        nav={false}
        autoplay={true}
        autoplayTimeout={2000}
        autoplayHoverPause={true}
        items={4}
        dots={false}
      >
        {imageSlider}
      </OwlCarousel>
    </>
  );
};
7 months ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post job Plans Our process Sales
Legal
Terms and conditions Privacy policy
© 2023 PeakU Inc. All Rights Reserved.