R
R
roman99662016-03-02 14:44:27
JavaScript
roman9966, 2016-03-02 14:44:27

Error with hanging an event?

I want to make a custom context menu in BackboneJS application. I am using this jQuery plugin. But when you right click on the element, an error appears.
Mistake:

Uncaught TypeError: ((jQuery.event.special[handleObj.origType] || (intermediate value)).handle || handleObj.handler).apply is not a functionjQuery.event.dispatch @ jquery.js:4624elemData.handle @ jquery.js:4292
converse.js:534 0 request id 8.1 state changed to 2

I call like this:
this.$el.contextmenu({
                    delegate: ".hasmenu",
                    menu: [
                        {title: "Copy", cmd: "copy", uiIcon: "ui-icon-copy"},
                        {title: "More", children: [
                            {title: "Sub 1", cmd: "sub1"},
                            {title: "Sub 2", cmd: "sub1"}
                            ]}
                        ],
                    select: function(event, ui) {
                        alert("select " + ui.cmd + " on " + ui.target.text());
                    }
                });

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question