Possible Duplicate:
Jquery event chaining
Traditionally we may write:
$("selector").click(function () {
});
but is it possible to chain events, something like so:
$("selector").click,keyup,keydown(function () {
});
I’m aware of the fact that I could write a function and reference that function in three seperate handlers, but this would be cleaner.
Use
.bind()For jQuery 1.7 and later, using the new
API.on() is more preferred