jquery.click(callmethod)
<p>$('').click(function(event) { ChangeXYZ(event); });</p>

<p>Problem with above is i do not want event but i someother var.</p>

<pre><code>$('&lt;a/&gt;').click(function() { ChangeXYZ(var123); });
</code></pre>

<p>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.</p>
