$('').click(function(event) { ChangeXYZ(event); });
Problem with above is i do not want event but i someother var.
$('<a/>').click(function() { ChangeXYZ(var123); });
But problem with line is, it is getting value of var123 at runtime and as i am adding this in loop so always end up using last value of var123. Looks like it is using reference for var123. How can i make it use value of var123 when this was created instead of click time.