I have a list of links on the page and sometimes they have events attached to them and sometimes not (they just don't do anything). I want to say, 'if this element has no event handlers (basically it doesn't do anything), then add a class of disabled to it. I googled it but didn't find anything for detecting event handlers. Does anyone know of a way to do something like this??
This should get you a list of events:
jQuery(theElement).data('events');
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With