What mean by "e" in different functions?
Hello I am new to jquery. Recently I read some beginner tutorial and got follow code:
<script type="text/javascript">
function showMsg(e) {
$(e.target).attr('disabled', true);
if ($('#msg').html().length == 0) {
$('#msg').html('
<h1>Hello</h1>');
}
$('#msg').fadeIn();
setTimeout(function(){
$('#msg').fadeOut();
$(e.target).attr('disabled', false);
}, 3000);
}
$(document).ready(function(e){
$('#btn').click(showMsg);
});
</script>
I have some experience in ASP and PHP but seldom reach client side language like javascript. I fail to understand what mean by the "e" in showMsg(e) and function(e). I guess e = event. But I am not sure what event it refer to since the event not defined anywhere in code. Is it default value? Can someone fill me the details? Thank for any input!