Jquery -- Action fires on any event
javascript, jquery
Solution
$('*').on('blur change click dblclick error focus focusin focusout hover keydown keypress keyup load mousedown mouseenter mouseleave mousemove mouseout mouseover mouseup resize scroll select submit', function(){
$('#error').empty();
});
...but would you want to do this?
Problem
Is there something in jquery where a function is triggered when any event is fired? I'd like something like this: ``` $("*").anyEvent(function(){ $("#error").html(""); }); ```