我想做一些动画,当我点击“li”时,特定的师应该是活动的。我已经尝试过了,但是当我点击li时,我不能显示特定的分组
这是我的jquery
$(document).ready(function(){
$('.clients-list li').click(function(){
$('.clients-list li').removeClass('active');
$(this).addClass('active');
});
});这是我的ul结构
<ul class="clients-list" role="tablist">
<li class="active">
<a data-toggle="tab" href="#client-01"><img src="images/demo-images/clients/client.jpg" alt="" /></a>
</li>
<li>
<a data-toggle="tab" href="#client-02"><img src="images/demo-images/clients/client2.jpg" alt="" /></a>
</li>
<li>
<a data-toggle="tab" href="#client-03"><img src="images/demo-images/clients/client3.jpg" alt="" /></a>
</li>
</ul>
<div class="client-testimonials-list">
<div id="client-01" class="single-testimonial tab-pane fade in active">
<h2>The Perfect Design theme is really amazing!</h2>
<p>Collaboratively administrate empowered markets via plug-and-play networks. Dynamically procrastinate B2C users after installed base benefits. Dramatically visualize customer directed convergence without revolutionary ROI. Efficiently unleash cross-media information without cross-media value. Quickly maximize timely deliverables for real-time schemas. </p>
<div class="client-info">
<h2>Jennifer Toyen</h2>
<p>Artist</p>
</div>
</div>
<div id="client-02" class="single-testimonial tab-pane fade in">
<h2>Use lap as chair destroy couch but rub face</h2>
<p>Use lap as chair destroy couch but rub face on everything for play time. Give attitude why must they do that yet stare at ceiling but hide when guests come over hunt anything that moves play time. Sweet beast stick butt in face yet flop over but flop over for hopped up on goofballs. Stare at ceiling stick butt in face and leave dead animals as gifts and missing until dinner time. Sweet beast sweet beast shake treat bag yet play time mark territory why must they do that. </p>
<div class="client-info">
<h2>Client Name two</h2>
<p>CTO, Company Name, TX</p>
</div>
</div>
</div>发布于 2015-12-13 19:53:38
我打开了两个浏览器选项卡,所以我回答了错误的问题,很抱歉:)
https://stackoverflow.com/questions/34250612
复制相似问题