Slide dynamic jQuery
<p>I have been trying to use jQuery to create an dynamic loop in an for loop.
For some reason when clicking the link that page is opened in an new window instead of sliding down.</p>

<pre><code>&lt;script type="text/javascript"&gt;
$('a.moreDetails').click(function() {
$(this).parent().next().toggle('fast');
});
&lt;/script&gt;

while ($row = mysql_fetch_array($res))
{
    echo '&lt;tr onMouseOver="addHighlight(this);" onMouseOut="removeHighlight(this);" onclick="setHighlighted(this);"&gt;
              &lt;td colspan="11"&gt; &lt;a href="includes/js/ajax_details_adres.php?id='.$row['id'].'" class="moreDetails"&gt;(details)&lt;/a&gt;&lt;div class="details" id="details'.$row['id'].'"&gt;More details&lt;/div&gt; &lt;/td&gt;
          &lt;/tr&gt;';
}
</code></pre>
