Reputation: 204
I use MeteorJs and nolimits4web:swiper
The first load of the page do not display margins and do not place slides correctly, but if a go to another page and come back or if I resize the page everything is working perfectly.
-> If a reload the page, it breaks it again.
The slider seems to init before loading my data or something like that but even waiting on the subscription does not seem to solve anything.
Any idea ?
Template.search.onRendered(function() {
var mySwiper = new Swiper ('.swiper-container', {
loop: false,
spaceBetween: 30,
slidesOffsetBefore: 20,
slidesPerView: 'auto',
grabCursor: true,
slidesOffsetAfter: 30,
});
});
Upvotes: 0
Views: 1191