In my master ng-controller
, I want to bind ALL inputs to a focus event and trigger a function. What I have tried (and failed) so far were:
// This makes sense since it is not a bind
$('input').focus(function(){});
// This should work, but doesn't!
$('input').bind('focus', function() {});
What are my options? How can I bind all input
to a focus?