tags:

views:

734

answers:

2

How can I make this sliding panel example to slide down on mouseover and slide back in on mouseout instead of using the click function?

See the example here: http://www.webdesignerwall.com/demo/jquery/simple-slide-panel.html

$(".btn-slide").click(function(){
 $("#panel").slideToggle("slow");
 $(this).toggleClass("active"); return false;
});
+1  A: 

Use the hover function. This should be close.

function slide() {
  $("#panel").slideToggle("slow");
  $(this).toggleClass("active"); 
  return false;
}

$(".btn-slide").hover(slide, slide);
Andy Gaskell