Jquery – Using bind( type, [data], fn ) and non-inline function

jquery

$("p").bind("click", function(event){
       // code goes here
});

This is quite understandable. But what is the way to use a non-inline function and pass the event as an argument? That is:

$("p").bind("click", myFunction(event));

 function myFunction(event) {
       // code goes here
 }

Thank you!

Best Solution

Here goes:

$("p").bind("click", myFunction);

function myFunction(event) {
    // code goes here
}