jQuery-contextMenu
jQuery-contextMenu copied to clipboard
context menu selector on element
presently the selector only accepts a sting, is there a way to bind the context menu to an element? ex: selector: $(elm)
I believe it's a duplicate of https://github.com/swisnl/jQuery-contextMenu/issues/136 Looking forward to this feature for a few months yet.
Yeah I've started on that feature a few times, but it seems to requires a lot of refactoring. Haven't had a big enough block of time to really dive into it.
Think you asked for selectors which mean sets, this seems more about a single element. Which is actually different.
Actually it would be great if the "selector" accepts the following:
- selector string (as it works now)
- single jQuery element
- a set of jQuery elements
- self element. Means element to which the plugin has been applied (by default in case "selector" option isn't set / undefined / null)
Implementation of this list will provide a great flexibility.
callback: function(key, options) {
if(key == 'delete') {
if (confirm('Are you sure?')) {
options.$trigger.remove();
}
}
}
It works with me 💃
I need this feature as well
I need this too. In my case it would be usefull to pass a selector like $("table tbody tr", some_var_as_context)