jquery - Sliding doesn't flow with floated elements -
i'm having issue toggle function combined slide effect. trying slide out div element, floated, , have neighboring div element (also floated left) slide take it's place. when use jquery ui in example below slide animation correct (just slide left), floated element next waits until animation complete before moving.
in example without jquery ui, neighboring element slides on other sliding out, making smooth transition. in case slide has both left , top animation not trying achieve.
i'm trying find solution using jquery ui it's embedded in site other features.
here have done similar looking for. jsfiddle demo
$('#toggle').bind('click',function() { $("#wrapper").toggleclass('collapse'); if ($("#wrapper").hasclass('collapse')) { $('.collapse').animate({'margin-left':'-50px'}); } if (!$("#wrapper").hasclass('collapse')) { $('#wrapper').animate({'margin-left':'0'}); } }); <div id="toggle">slide</div> <div id="space"></div> <div id="wrapper"><div id="left"> </div> <div id="right"> <div> </div> #wrapper { overflow:hidden; maegin-left:0; }
Comments
Post a Comment