$("#test2").bind('keyup change', A);
/ change as for different elements and events - this:
$("#test1, #test2").bind('keyup change', A);
or
$("#test1").bind('keyup', A);
$("#test2").bind('change', A);
depending on what you expect. There is no simpler way
source
share