jQuery.inArray()
Search for a specified value within an array and return its index (or -1 if not found).
version added: 1.2jQuery.inArray( value, array [, fromIndex ] )
The
<span style="color: #333333;">$.inArray()</span>
method is similar to JavaScript’s native<span style="color: #333333;">.indexOf()</span>
method in that it returns -1 when it doesn’t find a match. If the first element within the array matches<span style="color: #333333;">value</span>
,<span style="color: #333333;">$.inArray()</span>
returns 0.