What are the two params in the function and how does this work?
<p>I saw this in an application and it works well but i dont understand how it works.... What is the function(i,text) part doing and what are they for </p>

<p>its being used <a href="http://jsfiddle.net/tDr4R/1/" rel="nofollow">here</a></p>

<pre><code>$(this).text(function(i,text) { return (text == 'Show') ? 'Hide' : 'Show'; });
</code></pre>
