jquery find a string in an array with spaces on it
<p>How can I make this work? I have an space in the third element of my array " John". </p>

<p>take a look: 
<a href="http://jsfiddle.net/hyHFT/" rel="nofollow">http://jsfiddle.net/hyHFT/</a></p>

<pre><code>&lt;style&gt;
  div { color:blue; }
  span { color:red; }
&lt;/style&gt;


&lt;div&gt;"John" found at &lt;span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;4 found at &lt;span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;"Karl" not found, so &lt;span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;script&gt;var arr = [ 4, "  Pete", 8, "  John" ];

$("span:eq(0)").text(jQuery.inArray("John", arr));
$("span:eq(1)").text(jQuery.inArray(4, arr));
$("span:eq(2)").text(jQuery.inArray("Karl", arr));

&lt;/script&gt;
</code></pre>

<p>Thanks
Gracias!
el Mescal</p>
