How to find the index of a clicked element from an array with jquery?
<p><strong>How can I find the index of a clicked anchor tag from an array with jquery???</strong></p>

<p>I want to search if there is an element that eqqal to clicked element, and if is true return the index of that element.</p>

<p>i tried with something like this but it return with -1</p>

<pre><code>$('#id').click(function(){

var obj = $('a').get(0).href;
var arr = $.makeArray(obj);
var getclickedhref = $(this).get(0).href;

var clickedindex = $.inArray(getclickedhref, arr);

console.log(clickedindex);
});
</code></pre>

<p>please can you help me??!</p>
