jQuery code lines from array
<p>This works ok:</p>

<pre><code>$('#icon1').live("hover", show_popup, hide_popup);
$('#icon2').live("hover", show_popup, hide_popup);
$('#icon3').live("hover", show_popup, hide_popup);
</code></pre>

<p>But this does not works and has no error:</p>

<pre><code>var icons = ['#icon1', '#icon2', '#icon3'];
for (icon in icons)
    $(icon).live("hover", show_popup, hide_popup);
</code></pre>

<p>What is wrong with that code?</p>
