jquery - slide (animation) not working -


i have page small buttons (more 2) profiles. working more or less fine, except hide , show (slidetoggle) - div (profilepannel) appears without nice slow expand, suddently.

only css element (margin-bottom) working fine. see it, may click profile one, see on second button, final effect.

jquery

var menu; $(document).ready(function(){     $('.img').click(function () {         menu = $("#" + $(this).data("menu"));         $(".profilepannel:not(#" + menu.attr("id") + ")").slideup("slow");         menu.slidetoggle("slow");     }); }) 

try it!

can nice , tell me why, , how can change it?

and btw, have trouble positioning profilepanel - wish show under each profile button, without moving rest of buttons. have tried position: relative, absolute, z-index have missed , dont have output wish.

it seems min-height causing issues. if remove/change that, effect going for:

.profilepannel {     width: 300px;     height: 150px;     border: 1px solid #000;     background: silver;     filter:alpha(opacity=75);     opacity: 0.75;     -moz-opacity:0.75;     position: relative;     z-index: 2;     display: none;     margin-bottom: 15px; } 

also, can better write

$(".profilepannel:not(#" + menu.attr("id") + ")").slideup("slow"); 

as:

$(".profilepannel").not(menu).slideup("slow"); 

jsfiddle

if want use min-height you'd need come alternative - or put in container , set min-height on that:

jsfiddle


Comments

Popular posts from this blog

android - Get AccessToken using signpost OAuth without opening a browser (Two legged Oauth) -

org.mockito.exceptions.misusing.InvalidUseOfMatchersException: mockito -

google shop client API returns 400 bad request error while adding an item -