Start a new discussion

To start a new discussion please visit the discussions section of the GitHub home page of the project.

Discussions on GitHub

You can also search our old self-hosted forums for any useful information below but please note that posting new content here is not possible any more.

Reply To: Animate entire menu slowly for totally collapsed mobile style?

Home Forums Older releases 0.9.x Animate entire menu slowly for totally collapsed mobile style? Reply To: Animate entire menu slowly for totally collapsed mobile style?

#2348
admin
Keymaster

Yes, you will need to use a slightly modified version of the JS code – for example, something like this:

$(function() {
  $('#menu-button').click(function() {
    var $this = $(this),
        $menu = $('#main-menu');
    if (!$this.hasClass('collapsed')) {
      if (!$menu.hasClass('collapsed')) {
        $menu.slideUp(250, function() { $(this).addClass('collapsed').css('display', ''); });
      }
      $this.addClass('collapsed');
    } else {
      $menu.slideDown(250, function() { $(this).removeClass('collapsed'); });
      $this.removeClass('collapsed');
    }
    return false;
  }).click();
});