jquery attr(name,value) method's value parameter
<p>I'm reading Bibeault's jQuery in Action and I'm having troublel understanding the <code>value</code> parameter of the <code>attr()</code> method. The book says that the parameter can be a function whose parameters are <code>index</code> and <code>previousValue</code>. What is the purpose of these parameters? I don't understand the text's explanation. </p>

<p>Specifically I want to know:</p>

<ol>
<li>Are these parameters mandatory?</li>
<li>What is an example of how these parameters are used?</li>
<li>Can I use other parameters within the function?</li>
</ol>
