jquery - On hover, I don't see my div sliding down with auto height of the parents -


i have menu dropdowns. on hover, want div id slider slide down , have take height of parent

this fiddle:
http://jsfiddle.net/cancerian73/uzzat/1/

#nav ul.subs {     color: #333333;     display: none;     left: auto;     position: absolute;     top: 60px;     width: 96%;     /*padding-left:50%;     margin-left:-405px;*/     z-index: 9606; } 

if want action applied multiple items should use classes.

also, should stretch animation inside mouse enter function.

$("#nav").mouseenter(function () {     var $stretch = $(".slider");     $stretch.animate({ height: $stretch.parent().height() }, 500 );     $("this").find('.slider').stop(true,true).slidedown(500); });  $("#nav").mouseleave(function () {     var $stretch = $(".slider");     $stretch.animate({ height: 0 }, 500 );             $("this").find('.slider').stop(true,true).slideup(500); }); 

alternatively, put uls inside slider divs instead of using strange mask.


Comments

Popular posts from this blog

java.util.scanner - How to read and add only numbers to array from a text file -

rewrite - Trouble with Wordpress multiple custom querystrings -