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

253
Views
Change Slides order in Swiper.js

I need to change the order of the slides in the front-end, so my client can select the position/order of each slide. I just realised that I could use the css flex box property "order: x" but it doesn't work fine if I have the Loop mode on.

<div class="jt-slider">
    <div class="swiper-wrapper">

        <div class="swiper-slide" style="background-image: url(coming/jt_0.jpg)"></div>
        <div class="swiper-slide" style="background-image: url(coming/jt_1.jpg)"></div>
        <div class="swiper-slide" style="background-image: url(coming/jt_2.jpg)"></div>
        <div class="swiper-slide" style="background-image: url(coming/jt_3.jpg)"></div>
        <div class="swiper-slide" style="background-image: url(coming/jt_4.jpg)"></div>
        <div class="swiper-slide" style="background-image: url(coming/jt_5.jpg)"></div>
        <div class="swiper-slide" style="background-image: url(coming/jt_6.jpg)"></div>
        <div class="swiper-slide" style="background-image: url(coming/jt_7.jpg)"></div>
        <div class="swiper-slide" style="background-image: url(coming/jt_8.jpg)"></div>
        <div class="swiper-slide" style="background-image: url(coming/jt_9.jpg)"></div>
        <div class="swiper-slide" style="background-image: url(coming/jt_10.jpg)"></div>
        <div class="swiper-slide" style="background-image: url(coming/jt_11.jpg)"></div>
        <div class="swiper-slide" style="background-image: url(coming/jt_12.jpg)"></div>
        <div class="swiper-slide" style="background-image: url(coming/jt_13.jpg)"></div>
        <div class="swiper-slide" style="background-image: url(coming/jt_14.jpg)"></div>
    
    </div>

Thats the basic Swiper html structure, when the loop mode is rendered it copy all the divs and adds a class "swiper-slide-duplicate"

It's strange that Swiper doesn't have an specific option to reorder them independently after the render...

I'm using native JavaScript, Jquery and CSS

Thank you!

almost 4 years ago · Santiago Trujillo
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!