我的anySlider看起来像这样
<link rel="stylesheet" href="http://css-tricks.github.com/AnythingSlider/css/theme-metallic.css">
<div id="externalNav">
Goto <a href="#1">One</a> |
<a href="#2">Two</a> |
<a href="#3">Three</a> |
<a href="#4">Four</a>
</div>
<br><br>
<ul id="slider">
<li><img src="http://placekitten.com/300/200" alt="" /></li>
<li><img src="http://placehold.it/300x200" alt="" /></li>
<li><img src="http://placebear.com/300/200" alt="" /></li>
<li><img src="http://lorempixel.com/300/200" alt="" /></li>
<li><img src="http://placedog.com/300/200" alt="" /></li>
</ul>
$('#slider').anythingSlider({
// If true, builds a list of anchor links to link to each panel
buildNavigation: false,
autoPlay: true
});
当自动播放发生并且第一张幻灯片处于活动状态时,我想将一个类添加到<a href="#1">One</a>
(对于下一张幻灯片等等),以便我可以将其显示为已选中。任何人都可以指出做出这个的正确方法是什么?
JsFiddle