0

I'm using this code at the moment. Every time I hover over the tab it opens, but when I try to click on the links in it, it automatically closes.

<script src="jquery.js"></script>
<script>
$(document).ready(function(){
  $("#click").hover(function(){
    $("#guts").slideToggle("fast")
 })
})
</script>
#click{
    margin-bottom:4px;
    padding:1px;
    text-transform:uppercase;
    letter-spacing:1px;
    text-align:center;
    background:#ffffff; /*tab 1 background color*/
    border:1px solid #000000;
    padding:1px;
    display:block;
    -webkit-transition: all 0.1s ease;
    -moz-transition: all 0.1s ease;
    transition: all 0.1s ease;
}
#guts{
    padding:1px;
    display:none;
}

1 Answers1

0

See here the thing is, You have associated the hover event with the #click id only, so whenever the #guts id slides down and you go over the #guts id, you leave the #click,so closing the view.

Try using hover on both i.e.

$(document).ready(function(){
  $("#click, #guts").hover(function(){
      $("#guts").slideToggle("fast")
    })
})
stackMonk
  • 1,033
  • 17
  • 33