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();
});

Register

You will be emailed a link to set your password.

Login

Lost password?