JS Swiper only able to get the first result from database - Hack The Tech - Latest News related to Computer and Technology

Hack The Tech - Latest News related to Computer and Technology

Get Daily Latest News related to Computer and Technology and hack the world.

Monday, June 7, 2021

JS Swiper only able to get the first result from database

I am trying to display results from my database. There are 6 results in it. Unfortunately, it can only able to display the first result. I want my result image and description and price to appear and followed by the button next. As of now, its only showing the first result. Attached at the end there is the first result that i could only get from the database and the other 5 result are blank.

JAVA SCRIPT

  var swiper = new Swiper('.swiper-container.platform', {
  effect: 'coverflow',
  initialSlide: 1,
  grabCursor: true,
  centeredSlides: true,
  slidesPerView: 'auto',
  coverflowEffect: {
    rotate: 0,
    stretch: 0,
    depth: 800,
    modifier: 1,
    slideShadows: true,
  },
  pagination: {
    el: '.swiper-pagination',
  }
});

HTML

<div class="swiper-slide platform">
           <div class="imgBx">
          
          </div>
          
          <div class="details">
          <?php echo make_slides($result); ?>
          
          </div>
        </div>

Image

enter image description here



source https://stackoverflow.com/questions/67862553/js-swiper-only-able-to-get-the-first-result-from-database

No comments:

Post a Comment