jQuery - passing id element to a non-anonymous callback function without using an anonymous function
<p>I'm trying to pass an element's <code>id</code> to <code>storePair</code></p>

<p><code>$("#someid").click(storePair($(this).val(),$(this).attr("id"));</code></p>

<p>using <code>$(this)</code> doesn't work. no value.</p>

<p>Another <a href="http://stackoverflow.com/questions/948198/non-anonymous-function-for-jquery-selector-click-myfunc">stackoverflow post</a> suggests that I use an anonymous function as a wrapper for <code>StorePair(val,id)</code>, i.e., </p>

<pre><code>$("#someid").click(function(){storePair($(this).val(),$(this).attr("id")});
</code></pre>

<p>That seems kind of roundabout... Is there a way to call <code>StorePair</code> and pass the value and id without using the anon function?</p>
