Refer to attributes from multiple selector in jQuery
<p>I have a bunch of DIVs identified by class screen-cat-comment and I want for each div to execute a plugin that receives as a parameter an attribute value from each DIV. </p>

<pre><code>&lt;div class="screen-cat-comment" catId="1"&gt;&lt;/div&gt;
&lt;div class="screen-cat-comment" catId="2"&gt;&lt;/div&gt;
&lt;div class="screen-cat-comment" catId="3"&gt;&lt;/div&gt;
</code></pre>

<p>then, the selector</p>

<pre><code>$('.screen-cat-comment').fragment({ code: $(this).attr('catId') });
</code></pre>

<p>Passing catId to myPlugin doesn't work -- from the current code, $(this).attr('catId') returns undefined. Is there any way to re-write this selector to pass attr('catId') to the plugin?</p>
