jquery - Bootstrap horizontal drop down menu with sliding animation -


so regular bootstrap drop down menu, want customize it'd have sliding animation , display horizontally, both @ same time. found solution the former:

// add slidedown animation dropdown $('.dropdown').on('show.bs.dropdown', function(e){   $(this).find('.dropdown-menu').first().stop(true, true).slidedown(); });  // add slideup animation dropdown $('.dropdown').on('hide.bs.dropdown', function(e){   $(this).find('.dropdown-menu').first().stop(true, true).slideup(); }); 

and the latter:

.dropdown-menu > li{   display: inline-block;   float:left; } .open> ul {   display: inline-flex !important; } 

but when tried combine both solutions things went wrong.

in milliseconds animation happens when opening drawer, height of menu larger should be, , likewise width of dropdown menu shrinks when closing drawer. seems should solved after overriding height somewhere, i'm unsure class exactly. possible have both these features on same drawer, in case?

for height: can override height in css max-height.

the problem, why dropdown-menu shrinks before closing css class of bootstrap display, gets rendered before sliding action triggered. work-around manually override display style display: inline flex (as when menu open).

your updated fiddle can found here.

i hope helps...


Comments

Popular posts from this blog

html - Styling progress bar with inline style -

java - Oracle Sql developer error: could not install some modules -

How to use autoclose brackets in Jupyter notebook? -