动画jquery的泛化

时间:2015-05-11 04:05:31

标签: javascript jquery html css

我是jquery的noob。我正在努力做到这一点:

我需要在鼠标悬停时单独折叠每个菜单.2菜单同时崩溃的问题! 我确定它是基本的东西,但我似乎无法弄明白。 请帮忙。谢谢



            $(document).ready(function() {

              $(".lead-title-index").hover(function() {
                $(".featured-content").slideDown("slow");

              });

            });

.featured-content {
  width: 200px;
  height: 400px;
  display: none;
  background: #2E2E2E;
}
.lead-title-index {
  background: #FFBF00;
  display: block;
  margin-bottom: 0px;
  position: relative;
  color: #000;
  font-size: 14px;
  width: 200px;
  height: 70px;
}

<script src="https://cdnjs.cloudflare.com/ajax/libs/knockout/3.2.0/knockout-min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/d3/3.4.11/d3.min.js"></script>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.0.1/jquery.min.js"></script>
<div class="col-md-15 col-sm-3">

  <div class="lead-title-index">

  </div>

  <article id="video" class="featured-content">

    <div class="promo-text">

    </div>
  </article>
</div>

<div class="col-md-15 col-sm-3">

  <div class="lead-title-index">

  </div>

  <article id="video" class="featured-content">

    <div class="promo-text">

    </div>
  </article>
</div>
&#13;
&#13;
&#13;

1 个答案:

答案 0 :(得分:0)

您需要在所选项目之后使用下一个项目,如下所示

        $(document).ready(function() {

          $(".lead-title-index").hover(function() {
            $(this).next(".featured-content").slideDown("slow");

          });

        });