jQuery index of the object in array
<p>I'm trying to get the index of the trigger element in the array.</p>

<p>The html looks like this:</p>

<pre><code>&lt;ul&gt;
     &lt;li&gt;&lt;a href="#" rel="group"&gt;Link 1&lt;/a&gt;&lt;/li&gt;
     &lt;li&gt;&lt;a href="#" rel="group"&gt;Link 2&lt;/a&gt;&lt;/li&gt;
     &lt;li&gt;&lt;a href="#" rel="group"&gt;Link 3&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
</code></pre>

<p>Then on click I'm calling the run() method of the obJ object:</p>

<pre><code>var obJ = {
    run : function(obj) {
        var att = obj.attr('rel');
        var arr = jQuery.find('a[rel='+att+']');
        alert(obj.indexOf(arr));
    }   
};
$(function() {
    $('a.click').click(function() {
        obJ.run($(this));
        return false;
    });
});
</code></pre>

<p>The above however doesn't give me the index of the trigger in the collected array.</p>

<p>Any thoughts?</p>
