Jump to content
Egor2014

Карусель пустое место после последнего товара

Recommended Posts

Появляется пустое место после прокрутки влево последнего товара, нужно это убрать

Код слайдера:

<div class="pagcolor">
<div id="slideshow<?php echo $module; ?>" class="swiper-container">
<div class="swiper-wrapper">
<?php foreach ($banners as $banner) { ?>
<div class="item swiper-slide">
<div class="visible-md visible-lg"><?php echo htmlspecialchars_decode($banner['description']);?></div>
<?php if ($banner['link']) { ?>
<a href="<?php echo $banner['link']; ?>"><img src="<?php echo $banner['image']; ?>" alt="<?php echo $banner['title']; ?>" class="img-responsive scaleslide" /></a>
<?php } else { ?>
<img src="<?php echo $banner['image']; ?>" alt="<?php echo $banner['title']; ?>" class="img-responsive scaleslide" />
<?php } ?>
</div>
<?php } ?>
</div></div>
<div class="swiper-pager">
<div class="swiper-button-next"></div>
<div class="swiper-button-prev"></div>
</div></div>
<script>
$(document).ready(function () { var viewedSwiper = new Swiper ('#slideshow<?php echo $module; ?>.swiper-container', { mode: 'horizontal', <?php if ($transitionStyle != '0') { ?> effect: <?php if ($transitionStyle == '1') { ?>"fade",<?php } ?><?php if ($transitionStyle == '2') { ?>"coverflow",<?php } ?><?php if ($transitionStyle == '3') { ?>"cube",<?php } ?> <?php } ?> watchSlidesVisibility:true, watchSlidesProgress:true, loop: true, grabCursor:true, autoplayDisableOnInteraction: true, speed:1000, autoplay: 5000, navigation: { nextEl: '.swiper-button-next', prevEl: '.swiper-button-prev', }, autoplay: { delay: 5000, }, }) 
viewedSwiper.on('transitionStart', function () { $('.swiper-slide').find('.text-slider1').removeClass('ef-slider1'); $('.swiper-slide').find('.text-slider2').removeClass('ef-slider2'); $('.swiper-slide').find('.text-slider3').removeClass('ef-slider3'); $('.swiper-slide').find('.text-slider4').removeClass('ef-slider4'); $('.swiper-slide.swiper-slide-active').find('.text-slider1').addClass('ef-slider1'); $('.swiper-slide.swiper-slide-active').find('.text-slider2').addClass('ef-slider2'); $('.swiper-slide.swiper-slide-active').find('.text-slider3').addClass('ef-slider3'); $('.swiper-slide.swiper-slide-active').find('.text-slider4').addClass('ef-slider4'); }); });
//stop on hover
$(document).ready(function(){var a=document.querySelector(".swiper-container").swiper;$(".swiper-container").mouseenter(function(){a.autoplay.stop()}),$(".swiper-container").mouseleave(function(){a.autoplay.start()})});
</script>

 

Share this post


Link to post
Share on other sites

а что вы предлагаете с этим кодом делать?

Share this post


Link to post
Share on other sites
9 минут назад, spectre сказал:

а что вы предлагаете с этим кодом делать?

Полагал здесь причина, вот сайт: test.трапеза18.рф   смотреть на мобильной версии Бизнес-Ланч

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
You are posting as a guest. If you have an account, please sign in.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


  • Recently Browsing   0 members

    No registered users viewing this page.

×

Important Information

On our site, cookies are used and personal data is processed to improve the user interface. To find out what and what personal data we are processing, please go to the link. If you click "I agree," it means that you understand and accept all the conditions specified in this Privacy Notice.