Do you want to achieve something like this ?
HTML
<div id="box"> <div id="panel"> </div> </div>
CSS
#box { height: 100px; width:200px; position:relative; border: 1px solid #000; } #panel { position:absolute; bottom:0px; width:200px; height:20px; border: 1px solid red; display:none; }
Js
$("#box").hover(function(){ $("#panel").slideToggle(); }, function(){ $("#panel").slideToggle(); });
OR in accordance with the update proposed by Roko
var panelH = $('#panel').innerHeight(); $("#box").hover(function(){ $("#panel").stop(1).show().height(0).animate({height: panelH},500); }, function(){ $("#panel").stop(1).animate({height: 0},500, function(){ $(this).hide(); }); });
Bongs source share