jQuery-contextMenu icon indicating copy to clipboard operation
jQuery-contextMenu copied to clipboard

Allow the selector receive an Element or JQueryNode

Open brunoinds opened this issue 3 years ago • 0 comments

Many developers creates elements programatically. Reference the selector by it's own path is not good in this case. So, the selector property could receive the element itself instead only receive the path string.

const element = document.createElement('button');
el.innerHTML('Click Me')

$.contextMenu({
    // Allow the selector be an Element or JQueryNode Element
    selector: element // or $(element), to make it easy for the implementation with JQuery
})

document.body.appendChild(element)

brunoinds avatar Jun 10 '21 15:06 brunoinds