Denis Denis - 1 year ago 58
jQuery Question

jQuery.mmenu dragOpen disable dragging at desktop

jQuery.mmenu uses Hammer.js for dragging, in the docs jQuery.mmenu says

Hammer.js enables dragging on touch and desktop devices. If you only want to enable dragging the menu open on touchscreens, use the $ variable.

I definitely want to disable dragging for desktops and use it's behaviour only at mobile. It says i shoud use
to do so. But how to use it? I've tried all possible scenarios, used any type there, placed it before and after plugin initialisation, but without luck.

How to use
to disable opening menu by mouse dragging on desktops?


I was looking for an answer to this too and figured it out just now. This is my whole configuration.

                            extensions: ["theme-dark"],
                            dragOpen: { open: ($ }
                            offCanvas: {
                                pageSelector: "#thepage"

This is the part for that enables dragopen only on touch devices:

dragOpen: { open: ($ }