javascriptjqueryoffsetmmenu

menu sliding in from left - add top margin offset


Is there a way to offset the menu in the options, vertically (in the Y position)?

I am sliding in the menu from the left in front of the page with the following:

   "offCanvas" : {
      "position"  : "left",
      "zposition" : "front"
   }

But, I want the menu to be about 200px from the top of the browser window.

I have tried adding a 'margin-top' - but for some strange reason, it moves the page as you go forwards/backwards to child menu's.

Any ideas / suggestions?

JSfiddle here --> I want the left mmenu to slide out below the orange bar. I was hoping there may be some sort of 'offset Y' that I could use.


Solution

  • I believe this should solve your problem:

    $("#menu").css('top', '22%');
    

    Here is a JSFiddle, in case you have any questions.