0

I am wanting to change the maxStartPos setting so that i can program it depending on the size of the page it loads on.

I've tried the following code but doesnt seem to change it:

$("nav#menu").mmenu({
    position        : "left",
    zposition       : "back",
    header          : false,
    searchfield     : false,
    dragOpen        : true,
    preventTabbing  : false,
    dragOpen: {
        open: true,
        maxStartPos: 50
    }
});

The part in the code is this where i am wanting to change:

if ( typeof opts.maxStartPos != 'number' )
{
opts.maxStartPos = this.opts.position == 'left' || this.opts.position == 'right'
? 9000
: 50;
}

The 9000 is the value i am wanting to change via the first code snip above.

StealthRT
  • 10,108
  • 40
  • 183
  • 342

1 Answers1

2

I just noticed that i have 2 dragOpen options within the code. Deleting the first one seems to solve the issue!

$("nav#menu").mmenu({
    position        : "left",
    zposition       : "back",
    header          : false,
    searchfield     : false,
    preventTabbing  : false,
    dragOpen: {
        open: true,
        maxStartPos: 50
    }
});
StealthRT
  • 10,108
  • 40
  • 183
  • 342