This is the jquery
$( document ).ready(function() {
$( "a" ).click(function( event ) {
alert( "Hi!" );
event.preventDefault();
});
});
within the function event
is a parameter to which we could replace it with whatever
and we could do as this whatever.preventDefault()
but I would like to know without inserting any parameter like function()
could we do only this .preventDefault();
does this work?