Cyclone Slider - jQuery Tab冲突

时间:2014-07-24 09:04:08

标签: jquery wordpress tabs slider

我想在jQuery选项卡中放置一个滑块,但是当jQuery代码隐藏选项卡并仅显示第一个选项卡时,滑块会失去其功能(保持隐藏状态)。

您可以在Kent主题的演示页面中找到该标签:http://demo.fabthemes.com/kent/ jQuery代码是:

    jQuery('#tabs div').hide();
    jQuery('#tabs div:first').show();
    jQuery('#tabs ul.tabnav li:first').addClass('active');

    jQuery('#tabs ul.tabnav li a').click(function(){
    jQuery('#tabs ul.tabnav li').removeClass('active');
    jQuery(this).parent().addClass('active');
    var currentTab = jQuery(this).attr('href');
    jQuery('#tabs div').hide();
    jQuery(currentTab).show();
    jQuery('.cycle-slideshow').cycle('reinit');
    return false;
    });

和Cyclone 2 Slider:

   <div tabindex="0" class="cycloneslider cycloneslider-template-standard cycloneslider-width-responsive" id="cycloneslider-gisheh-1" style="max-width:960px">
          <div class="cycloneslider-slides cycle-slideshow" data-cycle-allow-wrap="true" data-cycle-dynamic-height="off" data-cycle-auto-height="960:400" data-cycle-auto-height-easing="null" data-cycle-auto-height-speed="250" data-cycle-delay="0" data-cycle-easing="" data-cycle-fx="fade" data-cycle-hide-non-active="true" data-cycle-log="false" data-cycle-next="#cycloneslider-gisheh-1 .cycloneslider-next" data-cycle-pager="#cycloneslider-gisheh-1 .cycloneslider-pager" data-cycle-pause-on-hover="false" data-cycle-prev="#cycloneslider-gisheh-1 .cycloneslider-prev" data-cycle-slides="&gt; div" data-cycle-speed="1000" data-cycle-swipe="false" data-cycle-tile-count="7" data-cycle-tile-delay="100" data-cycle-tile-vertical="true" data-cycle-timeout="4000">
                  <div class="cycloneslider-slide cycloneslider-slide-image">
                          <img src="http://example.com/img/img1.jpg" alt="" title="" />
                  </div>
                  <div class="cycloneslider-slide cycloneslider-slide-image">
                          <img src="http://example.com/img/img2.jpg" alt="" title="" />
                  </div>
                  <div class="cycloneslider-slide cycloneslider-slide-image">
                          <img src="http://example.com/img/img3.jpg" alt="" title="" />
                  </div>
                  <div class="cycloneslider-slide cycloneslider-slide-image">
                          <img src="http://example.com/img/img4.jpg" alt="" title="" />
                  </div>
          </div>
          <div class="cycloneslider-pager"></div>
          <a href="#" class="cycloneslider-prev"> <span class="arrow"></span> 
          </a>
          <a href="#" class="cycloneslider-next"> <span class="arrow"></span> 
          </a>
    </div>

这就是我到目前为止所做的事情: 阅读this question。没有为我工作! 阅读this page。试图破坏,循环,重新启动;没人工作。

提示:滑块是一个wordpress插件。 jQuery选项卡隐藏了滑块的所有部分(div和子部分),一旦它被隐藏,它就永远无法恢复生机!它已在标签外试过。滑块显示,一旦隐藏(使用Inspect Element),它就永远不会回来! 我也试过其他滑块。他们一旦显示就回来了:没有被删除!

你的建议是什么?

1 个答案:

答案 0 :(得分:0)

似乎Cyclone没办法!我不得不使用Weptile Image Slider Widget。