Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
在这个例子中http://sorgalla.com/projects/jcarousel/examples/static_controls.html我需要一个活动状态 li 所以每当我滑动时它应该看起来像这样。
有人知道吗?
试试这个:
$('.jcarousel-control a').click(function(e){ e.preventDefault(); var txt = $(this).text(); $('.jcarousel-list li').removeClass('active'); $('.jcarousel-list li:eq(' + (txt - 1) + ')').addClass('active') })