Auto height introduction

By default, a menu opened from the top/bottom will fill up 80% of the available height. To automatically measure the height, include the "autoHeight" add-on .js and .css files and use the autoHeight options.

   <script src="path/to/jquery.js"></script>
   <script src="path/to/jquery.mmenu.js"></script>
   <script src="path/to/jquery.mmenu.autoheight.js"></script>
   <link href="path/to/jquery.mmenu.css" rel="stylesheet" />
   <link href="path/to/jquery.mmenu.autoheight.css" rel="stylesheet" />
      $(document).ready(function() {
            autoHeight: {
               // auto height options


Give it a go, change the options below and see how it affects the menu in the example on the right.

  • Automatically measure the menu height.
   jQuery(document).ready(function( $ ) {


Options for the "autoHeight" add-on

Option Default value Datatype Description
autoHeight A map of options or true for autoHeight.height = "auto".
height "default" String What type of height to use.
Possible values: "default", "auto" or "highest".

Configuration for the "autoHeight" add-on

The "autoHeight" add-on has no configuration options.

API methods for the "autoHeight" add-on

The "autoHeight" add-on has no API methods.

SCSS variables for the "autoHeight" add-on

Variable Default value Datatype Description
Include CSS
$mm_opt_autoheight true Boolean Whether or not to include CSS for the autoHeight add-on throughout the entire CSS framework.

Next add-on:
Back button