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

Django REST Framework perform_create: You cannot call `.save()` after accessing `serializer.data` -

Why does Go error when trying to marshal this JSON? -