当点击 li 时 jquery 显示除法

标签 jquery html css

当我点击 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>

最佳答案

我打开了两个浏览器选项卡,所以我回答了错误的问题,对此感到抱歉:)

关于当点击 li 时 jquery 显示除法,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/34250612/

相关文章:

html - Css 导航菜单文本

html - CSS显示:table-cell,设置高度和溢出:hidden,不起作用?

javascript - 如何根据动态值删除多个选择选项

javascript - 在 Laravel 中将 GET 参数传递给 POST

javascript - 自动聚焦列表项中的表单输入

javascript - 从数组中选择单个对象以在 View 中显示 [Angular]

Jquery 如果 span[itemprop=employmentType] 有 = 特定的文本/输出

JQuery 滚动条不工作

javascript - Bootstrap 4 不更新弹出窗口的 onclick 属性

javascript - 如何使 bootstrap 下拉列表可拖动?