Hide slider-arrow-left and slider-arrow-right for One Image slider

1 reply · opened Mar 4, 2017

RraednetMar 4, 2017

How hide the slider-arrow-left/slider-arrow-right automatically by jQuery if the slider is One.

<section id="slider" class="slider-parallax swiper_wrapper clearfix">
<div class="swiper-container swiper-parent">

  &lt;div class="swiper-wrapper"&gt;    

    &lt;div class="swiper-slide dark" style="background-image: url('images/slider_home1.jpg');"&gt;
      &lt;div class="container clearfix"&gt;
        &lt;div class="slider-caption slider-caption-center"&gt;
          &lt;h2 data-caption-animate="fadeInUp"&gt;Welcome to UAEU Blog Center&lt;/h2&gt;
          &lt;p data-caption-animate="fadeInUp" data-caption-delay="200"&gt;Be still and know.&lt;/p&gt;
          &lt;p data-caption-animate="fadeInUp" data-caption-delay="100"&gt;[More info](#)&lt;/p&gt;
           
        &lt;/div&gt;
      &lt;/div&gt;
    &lt;/div&gt;

  &lt;/div&gt;
  &lt;div id="slider-arrow-left"&gt;&lt;i class="icon-angle-left"&gt;&lt;/i&gt;&lt;/div&gt;
  &lt;div id="slider-arrow-right"&gt;&lt;i class="icon-angle-right"&gt;&lt;/i&gt;&lt;/div&gt;
  &lt;div id="slide-number"&gt;
    &lt;div id="slide-number-current"&gt;&lt;/div&gt;
    &lt;span&gt;/&lt;/span&gt;
    &lt;div id="slide-number-total"&gt;&lt;/div&gt;
  &lt;/div&gt;
&lt;/div&gt;

</section>

SSemicolon WebSTAFFMar 20, 2017

Hello,

Unfortunately, this is currently not supported by default. But you can consider adding the following JS Code:


	if( jQuery('.swiper-slide').length 

This will definitely work fine. Hope this Helps!

Let us know if we can help you with anything else or if you find any further issues.

Have the same question, or something new?

Sign in to the Canvas dashboard to reply or open your own topic. Canvas owners get direct help from the SemiColonWeb team.

Reply on the dashboard