5
someone knows if/how it is possible to assign multiple events to a Jquery element in a single row?
For example:
$('#elemento')
.keyup(function(){...})
.focusout(function(){..});
5
someone knows if/how it is possible to assign multiple events to a Jquery element in a single row?
For example:
$('#elemento')
.keyup(function(){...})
.focusout(function(){..});
7
The documentation of .on()
says:
Syntax:
.on( events[, selector] [, data], callback )
and the description of events says:
One or more space-separated Event types
that is to say:
one or more event types separated by spaces.
An example would be:
$('#elemento').on('keyup focusout', function(){
Thanks man, thank you!
@Leandrohermesness of nothing, I’m glad to help.
Browser other questions tagged jquery
You are not signed in. Login or sign up in order to post.
You can use
$('#elemento').on('keyup focusout etc', function(){
– Sergio