swisnl / jQuery-contextMenu

jQuery contextMenu plugin & polyfill
https://swisnl.github.io/jQuery-contextMenu/
MIT License
2.25k stars 744 forks source link

ignore element type in selector? #684

Closed scorsy63 closed 5 years ago

scorsy63 commented 5 years ago

I have a table with 3 columns. I want the contextMenu to work on all elements inside the TD's except for input type elements. Is there a way to achieve this?

My selector looks like this: $.contextMenu({ selector: '.tr_class td', callback: function(key, options) { } });

Using a :not selector, which does not work: $.contextMenu({ selector: '.tr_class td:not(input)', callback: function(key, options) { } });

scorsy63 commented 5 years ago

found a different way to achieve what i was looking for, don't need to mess with the selector anymore.