- Is there a way in javascript to detect if an element has any events attached to it?
- jQuery(theElement).data('events');
- $("element").data("events");
- if(typeof document.getElementById("elementname").onchange === "function"){
- alert("has a function");
- } else {
- alert("no function");
- }