flexslider.js,当li拥有“ flex-active-slide”类时,如何添加属性?

时间:2018-09-03 00:40:31

标签: javascript jquery flexslider

在flexslider.js上,当Li元素在DOM中具有类名“ flex-active-slde”时,我想在此li上添加属性tabindex =“ 0”

这是示例代码

http://jsfiddle.net/xdd8kret/113/

<section class="slider">

<div id="slider" class="flexslider">
          <ul class="slides">
            <li>
                <a href="#"><img src="http://flexslider.woothemes.com/images/kitchen_adventurer_cheesecake_brownie.jpg" />
              </a>
            </li>
                <li>
                 <a href="#"><img src="http://flexslider.woothemes.com/images/kitchen_adventurer_lemon.jpg" />
              </a>
                </li>
                <li>                <img src="http://flexslider.woothemes.com/images/kitchen_adventurer_donut.jpg" />
                </li>
                <li>
                 <a href="#"><img src="http://flexslider.woothemes.com/images/kitchen_adventurer_caramel.jpg" /></a>
                </li> 

          </ul>
        </div>
      </section>
//http://flexslider.woothemes.com/index.html
$(window).load(function(){

  $('#slider').flexslider({
    animation:'fade',
    slideshowSpeed:5000,
    animationSpeed:500,
    directionNav:true,
    pausePlay:true


  });

});

请帮助

0 个答案:

没有答案