如果显示幻灯片3,则隐藏控件

时间:2019-05-10 14:43:23

标签: jquery flexslider

2个问题:

1)如果特定的幻灯片可见,我正在尝试隐藏滑块控件。我正在使用flexislider。每个幻灯片都有自己的课程。

我尝试过:

  $(".slides li").change(function() {
    if ($('.reg-slider.four').is(':visible')) {
      $(".flex-control-nav").hide();
    }
  });

但是没有用。

2)我正在使用avada主题,并且flexslider在其中自动构建。我想将动画从淡入淡出更改为幻灯片,并尝试:

$(window).load(function() {
  $('.flexslider').flexslider({
    animation: "slide",
    rtl: true
  });
});

HTML:

<div class="flexslider slider" data-autoplay="0" data-animation="slide">
      <ul class="slides">
        <li>
          <div class="reg-slider one" style="background-image: url(https://com-unity.istolar.fr/wp-content/uploads/2019/05/Group-5@2x.png) !important;">
            <div class="reg-logo">
              <img src="https://com-unity.istolar.fr/wp-content/uploads/2019/05/Group-11485@2x-1.png" draggable="false" scale="0">
            </div>
            <div class="reg-body">
              <h1>ברוכים הבאים<br> לקומיוניטי
              </h1>

            </div>
          </div>
        </li>
        <li>
          <div class="reg-slider one" style="background-image: url(https://com-unity.istolar.fr/wp-content/uploads/2019/05/Group-5@2x.png) !important;">
            <div class="reg-logo">
              <img src="https://com-unity.istolar.fr/wp-content/uploads/2019/05/Group-11485@2x-1.png" draggable="false" scale="0">
            </div>
            <div class="reg-body">
              <h1>ברוכים הבאים<br> לקומיוניטי
              </h1>
            </div>
          </div>
        </li>
        <li>
          <div class="reg-slider one" style="background-image: url(https://com-unity.istolar.fr/wp-content/uploads/2019/05/Group-5@2x.png) !important;">
            <div class="reg-logo">
              <img src="https://com-unity.istolar.fr/wp-content/uploads/2019/05/Group-11485@2x-1.png" draggable="false" scale="0">
            </div>
            <div class="reg-body">
              <h1>ברוכים הבאים<br> לקומיוניטי
              </h1>
            </div>
          </div>
        </li>
        <li>
          <div class="reg-slider one" style="background-image: url(https://com-unity.istolar.fr/wp-content/uploads/2019/05/Group-5@2x.png) !important;">
            <div class="reg-logo">
              <img src="https://com-unity.istolar.fr/wp-content/uploads/2019/05/Group-11485@2x-1.png" draggable="false" scale="0">
            </div>
            <div class="reg-body">
              <h1>ברוכים הבאים<br> לקומיוניטי
              </h1>
            </div>
          </div>
        </li>
        <li>
          <div class="reg-slider one" style="background-image: url(https://com-unity.istolar.fr/wp-content/uploads/2019/05/Group-5@2x.png) !important;">
            <div class="reg-logo">
              <img src="https://com-unity.istolar.fr/wp-content/uploads/2019/05/Group-11485@2x-1.png" draggable="false" scale="0">
            </div>
            <div class="reg-body">
              <h1>ברוכים הבאים<br> לקומיוניטי
              </h1>
            </div>
          </div>
        </li>
      </ul>
          </div>

<div class="flexslider slider" data-autoplay="0" data-animation="slide"> <ul class="slides"> <li> <div class="reg-slider one" style="background-image: url(https://com-unity.istolar.fr/wp-content/uploads/2019/05/Group-5@2x.png) !important;"> <div class="reg-logo"> <img src="https://com-unity.istolar.fr/wp-content/uploads/2019/05/Group-11485@2x-1.png" draggable="false" scale="0"> </div> <div class="reg-body"> <h1>ברוכים הבאים<br> לקומיוניטי </h1> </div> </div> </li> <li> <div class="reg-slider one" style="background-image: url(https://com-unity.istolar.fr/wp-content/uploads/2019/05/Group-5@2x.png) !important;"> <div class="reg-logo"> <img src="https://com-unity.istolar.fr/wp-content/uploads/2019/05/Group-11485@2x-1.png" draggable="false" scale="0"> </div> <div class="reg-body"> <h1>ברוכים הבאים<br> לקומיוניטי </h1> </div> </div> </li> <li> <div class="reg-slider one" style="background-image: url(https://com-unity.istolar.fr/wp-content/uploads/2019/05/Group-5@2x.png) !important;"> <div class="reg-logo"> <img src="https://com-unity.istolar.fr/wp-content/uploads/2019/05/Group-11485@2x-1.png" draggable="false" scale="0"> </div> <div class="reg-body"> <h1>ברוכים הבאים<br> לקומיוניטי </h1> </div> </div> </li> <li> <div class="reg-slider one" style="background-image: url(https://com-unity.istolar.fr/wp-content/uploads/2019/05/Group-5@2x.png) !important;"> <div class="reg-logo"> <img src="https://com-unity.istolar.fr/wp-content/uploads/2019/05/Group-11485@2x-1.png" draggable="false" scale="0"> </div> <div class="reg-body"> <h1>ברוכים הבאים<br> לקומיוניטי </h1> </div> </div> </li> <li> <div class="reg-slider one" style="background-image: url(https://com-unity.istolar.fr/wp-content/uploads/2019/05/Group-5@2x.png) !important;"> <div class="reg-logo"> <img src="https://com-unity.istolar.fr/wp-content/uploads/2019/05/Group-11485@2x-1.png" draggable="false" scale="0"> </div> <div class="reg-body"> <h1>ברוכים הבאים<br> לקומיוניטי </h1> </div> </div> </li> </ul> </div> 但也无济于事。

感谢您的帮助!

0 个答案:

没有答案