handler = function(e) {
            menu.origin = e.type;
            var target = e.target || e.srcElement;

            // Ignore Menu on textinput
            if (!options.textinput &&
            (target.tagName == 'INPUT' || target.tagName == 'SELECT' || target.tagName == 'TEXTAREA' || target.isContentEditable)) {
                return;
            }

            var x = e.pageX || e.originalEvent.touches[0].pageX;
            var y = e.pageY || e.originalEvent.touches[0].pageY;

            menu.open(menuView, {
                'left': x,
                'top': y
            });

            $el.addClass("ui-context-menu");
            return false;
        }
Add a context menu to an element
the menu can be open by left click and tap hold on ipad

@param {jqueryElement} el
@param {array} menu menu items
@param {object} options