1

I am using the vertical menu setting on mmenu and am wondering if I can animate the display of the secondary list items when the expand/collapse link is clicked? I tried applying CSS transitions but the sub menu just hides and shows. I also removed the CSS that changes the from display:none to display:block and tried to just use opacity.

Any ideas?

thanks.

1
  • 1
    can you provide a small demo at all?
    – scniro
    Oct 23, 2015 at 21:25

1 Answer 1

0

I was able to get this working as follows: Remove this CSS

.mm-vertical li.mm-opened > .mm-panel,
li.mm-vertical.mm-opened > .mm-panel {
  display: block; }

Add this jQuery:

var API = $( '#site-navigation' ).data( 'mmenu' );
API.bind( "openPanel", function( $panel ) 
$panel.slideDown( 'slow' );
});
API.bind( "closePanel", function( $panel ) {
$panel.slideUp( 'slow' );
 });

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.