How does javascript 'e' work?

Asked

Viewed 60 times

1

In some codes I see, some people use the 'and' character in functions like:

function NomeDaFuncao(e){ 
  alert("teste");
}

would like to know how it works, for what it serves and some example where I can use it.

1 answer

4


Use is just a short Event. You can pass any variable name you want.

$('#myTable').click(function(anyothername) {
    var clicked = $(anyothername.target);
});

You can check more about the treatment of jQuery events .

Browser other questions tagged

You are not signed in. Login or sign up in order to post.