Both will be triggered . The passage of the parameters is determined by who issues the event, not by its appointment in the listeners. So the first parameter (event object) is always passed by jQuery, regardless of whether it is named in your listener or not.
In the first case, evento
and dados
can still be accessed via arguments[0]
and arguments[1]
respectively:
$("#seletor2").on("click", function(){
var evento = arguments[0];
var dados = arguments[1];
});
In your second listener, the variables do not need to be defined because the parameters are already named, but the arguments
object is also available:
$("#seletor2").on("click", function(evento, dados){
console.log(evento === arguments[0]); // true
console.log(dados === arguments[1]); // true
});