Skip to content

Allow the selector receive an Element or JQueryNode #748

Open
@brunoinds

Description

@brunoinds

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)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions