Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow the selector receive an Element or JQueryNode #748

Open
brunoinds opened this issue Jun 10, 2021 · 0 comments
Open

Allow the selector receive an Element or JQueryNode #748

brunoinds opened this issue Jun 10, 2021 · 0 comments

Comments

@brunoinds
Copy link

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)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant