Skip to content

Possible to move nav-arrows outside swiper-container? #4219

Answered by vltansky
Nicke-N asked this question in Q&A
Discussion options

You must be logged in to vote
    <div class="swiper-container">
      <div class="swiper-wrapper">
        <div class="swiper-slide">Slide 1</div>
        <div class="swiper-slide">Slide 2</div>
        <div class="swiper-slide">Slide 3</div>
      </div>
    </div>
    <button type="button" class="swiper-navigation-prev">Prev</button>
    <button type="button" class="swiper-navigation-next">Next</button>

    <!-- Swiper JS -->
    <script src="https://unpkg.com/swiper/swiper-bundle.min.js"></script>

    <!-- Initialize Swiper -->
    <script>
      var swiper = new Swiper(".swiper-container", {
        navigation: {
          nextEl: ".swiper-navigation-next",
          prevEl: ".swiper-navigation-prev"
        }

Replies: 1 comment 3 replies

Comment options

You must be logged in to vote
3 replies
@Nicke-N
Comment options

@vltansky
Comment options

@Nicke-N
Comment options

Answer selected by vltansky
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants