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

244
Views
How to make that not all slides are scrolled, but the selected one only (SwiperJS)

I need, for example, that after selecting the fifth slide, being on the first one, the fifth one appears - without scrolling through all the other slides (2,3,4). I use this demo https://swiperjs.com/demos/070-pagination-custom/core

<!-- Html part -->    
    <!-- MAIN --> 
    <div class="swiper-slide">
      <div class="buttons" id="btns_main">
        <button class="page1">page1</button>
        <button class="page2">page2</button>
        <button class="page3">page3</button>
      </div>
    </div> 





<!-- JS part -->
    const swiper = new Swiper('.swiper', {
      // Optional parameters
      direction: 'horizontal',
      
      parallax: false,
      
      allowTouchMove: false,
    
      /* effect: 'flip',
      flipEffect: {
        slideShadows: false,
      }, */
        
    });
    
    const els = document.querySelectorAll('.back_contact, .back');
    els.forEach ( el => {
      el.onclick = () => {
      swiper.slideTo(0, 250)
    }
    });
    
    document.querySelector('.page1').onclick = () => {
      swiper.slideTo(1, 250)
    }
    
    document.querySelector('.page2').onclick = () => {
      swiper.slideTo(2, 250)
    }
    
    document.querySelector('.page3').onclick = () => {
      swiper.slideTo(3, 250)
    }
about 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!