In jquery passing argument in callback function

In an introduction you have learnt how to attach event on page load and calling a function. But in that case argument was not passed. Now we want to pass argument into the calling function. And if we do it as


$(function(){
$("#link1").click(hello("Jack"));

function hello(name)
{
alert("Hello "+name);
}


click
The above way or method is wrong. The correct one is


$(function(){
$("#link1").click( function(){

hello("Jack");
});
});

function hello(name)
{
alert("Hello "+name);
}


click