Why .ajaxError and friends are not static functions of jQuery?
I don't get why .ajaxError and friends which are basically custom events are coupled with dom elements.
- // why should i bind to document, if i don't need it
- $(document).ajaxError(function() {
- reportError()
- }
especially given that reporting to dom would be still easy the other way around
- $.ajaxError(function(){
- $(".msg").html("ajax error")
- }
Anyone can explain?
Thanks,
Federico