Kowshik
Kowshik

Reputation: 73

sliding not working

I need the navigation tab on the left side to slide down its contents on hover. But the code is not working. What might be the problem.

 <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>

Upvotes: 0

Views: 65

Answers (2)

Nandu
Nandu

Reputation: 3126

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

replace script/javascript by text/javascript

Upvotes: 0

Idrizi.A
Idrizi.A

Reputation: 12080

Replace

<script type="script/javascript">

with

<script type="text/javascript">

or just use

<script>

Upvotes: 3

Related Questions