get first occurred only in an array
<p>i have an arrayX of three elements , and i'm using $.inArray() to search for this three element in another arrayY ... and returning the location for each X element in Y</p>

<pre><code>X = [1,2,3] ;
y = [1,5,6,1,6,9,3,2] ;
</code></pre>

<p>But there is duplication in <code>y</code>, 1 occurred twice in <code>y[0]</code> and <code>y[3]</code> </p>

<p>The real example is here <a href="http://jsfiddle.net/minagabriel/kHG9K/" rel="nofollow">http://jsfiddle.net/minagabriel/kHG9K/</a></p>

<p>How do I get the first 1 occupancy and skip the others? </p>

<p>I'm pushing the location of 1,2,3 in an array with the first occurred of each one </p>
