DanielaB67
DanielaB67

Reputation: 442

MMenu plugin don't opens to right in Mobile

After searching the web I found that the best menu for mobile is the mmenu.frebsite.nl. The mmenu has "Advanced" option to open the menu on the left or right, and it does working in desktop version, but when checked on mobile (iphone and android), both buttons open the menu on the left side. Anyone tried the options on mobile or knows how to fix it?... Thanks.

Upvotes: 0

Views: 1057

Answers (2)

Using position: 'right' is depreciated. So try

 $('nav#main-nav').mmenu({
   classes: "mm-dark",
   offCanvas: { position  : "right", zposition: "front" }
  });

Upvotes: 0

Andrew K
Andrew K

Reputation: 147

Setting the menu to open to the right involves two steps, the first isn't explained very well within mmenu's documentation. Note: I'm using version 4.2 at the time of this response.

Step 1)

Include the positioning CSS or SASS file in your project (extensions/jquery.mmenu.positioning.scss or extensions/jquery.mmenu.positioning.css). Including these files also allows you to set the zposition value.

Step 2)

Set the right value in the mmenu function

$(function() {
  $('nav#main-nav').mmenu({
  classes: 'mm-dark',
  position: 'right',
  zposition: 'front'
});

Upvotes: 1

Related Questions