jquery - Swiper with holder.js -


in use of holder.js height of swiper's wrong. because swiper executed before / simultaneously holder.js. holder.js must performed first swiper knows correct image dimensions. there simple solution?

$(document).ready(function () {  // ============================================= // carousel (swiper) // =============================================          //  hero carousel         // - - - - - - - - - - - - - - - - - - - - -          var herocarousel = new swiper('.swiper-hero', {           keyboardcontrol:true,           autoplay: 3000,           autoplaydisableoninteraction: false,           autoheight: true,           pagination: '.swiper-hero-pagination',           loop: true,           simulatetouch: false,           paginationclickable: true,           slidesperview: 1,           nextbutton: ".swiper-hero-r",           prevbutton: ".swiper-hero-l",             breakpoints: {             544: {              },             992: {              },             1200: {              }           }       });  }); 

before create carousel swiper, add holder.run(). force holder render placeholders before internal "dom ready" handler called.


Comments

Popular posts from this blog

scala - 'wrong top statement declaration' when using slick in IntelliJ -

c# - DevExpress.Wpf.Grid.InfiniteGridSizeException was unhandled -

PySide and Qt Properties: Connecting signals from Python to QML -