Lets say i attached an event handler to the document:
$(document).on("keydown", function(e) {
if(e.keyCode == 38){
alert("Danger");
}
});
How can i check now in another function if this event handler is attached to the document. To be more clearer i would like to do something like this:
if($(document).on("keydown"){
$(document).off("keydown");
}
Thanks!