0

我需要左侧的导航选项卡在悬停时向下滑动其内容。但是代码不起作用。可能是什么问题。

 <ul class="nav nav-tabs nav-stacked">
    <li  id = "mousehover">
       <a style="background-color:#f78144; color: #000; text-align: center;" href="#">Time  Table</a>
    </li>
  </ul>
  <div id = "hovercontent">
    Contents 1 
  </div>



<script type = "script/javascript">
  $(document).ready(function(){
     $("#mousehover").hover(function(){
        $("#hovercontent").slideDown("slow");
     });
  });
</script>
4

2 回答 2

3

代替

<script type="script/javascript">

<script type="text/javascript">

或者只是使用

<script>
于 2012-12-28T05:26:17.693 回答
0
<script type = "text/javascript">
  $(document).ready(function(){
     $("#mousehover").hover(function(){
        $("#hovercontent").slideDown("slow");
     });
  });
</script>

用文本/javascript替换脚本/javascript

于 2012-12-28T05:34:56.270 回答