question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Idnangero Swiper is not working for Dynamic data

See original GitHub issue

This is html content

<div class="swiper-container"> <div class="swiper-wrapper"> <div class="swiper-slide" id="contentDiv">------>am adding dynamic content here<------
    </div>
    <!-- Add Pagination -->

    </div>
    <!-- Add Arrows -->
<div class="swiper-pagination"></div>
    <div class="swiper-button-next"></div>
    <div class="swiper-button-prev"></div>
</div>

and this is script

<script> var swiper = new Swiper('.swiper-container', { pagination: '.swiper-pagination', paginationClickable: true, nextButton: '.swiper-button-next', prevButton: '.swiper-button-prev', spaceBetween: 30 }); </script>

Is there anything else, Please help me

Issue Analytics

  • State:closed
  • Created 8 years ago
  • Comments:9 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
nolimits4webcommented, Feb 2, 2016

Works without any problems:

<div class="swiper-container">
    <div class="swiper-wrapper"></div>
</div>
// Add slides dynamically
for (var i = 0; i < 10; i++) {
    $('.swiper-wrapper').append('<div class="swiper-slide">Slide ' + i + '</div>');
}
// And init swiper
var swiper = new Swiper('.swiper-container');
0reactions
lock[bot]commented, Jun 26, 2018

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Idnangero Swiper is not working for Dynamic data · Issue #1592
NaveenGB commented on Jan 28, 2016. I have created with swipe.js(Jquery), swipe is working fine but am unable to get ...
Read more >
idangerous swiper issue with dynamic content - Stack Overflow
I have tested it with static content it's working fine, no need to resize the window but once I switch to dynamic content,...
Read more >
Swiper doesn't work properly (cannot swipe) - Questions
Hi there, I'm having trouble with a dynamic swiper slider I've created. So I made a get request to fetch images from the...
Read more >
Swiper Vue.js Components
Swiper is the most modern free mobile touch slider with hardware accelerated transitions and amazing native behavior.
Read more >
ViteJS And ReactJS Dynamic Slides Using SwiperJS - YouTube
ReactJS Dynamic Slides Using SwiperJS#react #swiperjs #vitejsIonic has depreciated IonSlides in the v6 release and recommends using the ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found