include a jquery drop down box below mysql results
<p>ok, i have a list of database results, below each row i have a drop down form with jquery, that allows each record to be amended, i then want to update the info with ajax to make the process simpler by not having to go off page.</p>

<p>Now i have the jquery form working, but it only appears for the first record and not the rest.</p>

<p>Here is my jquery code:</p>

<pre><code>$(function()
{
$("#trigger").click(function(event) {
event.preventDefault();
$("#box").slideToggle();
});
$("#box a").click(function(event) {
event.preventDefault();
$("#box").slideUp();
});
});
</code></pre>

<p>MY CSS CODE:</p>

<pre><code>#box {
display: none;
}
</code></pre>

<p>And the code where it is added to my mysql/ php results</p>

<pre><code>&lt;table width="95%" border="0" class="row_result"&gt;
            &lt;tr onmouseover="this.className = 'hlt';" onmouseout="this.className =     '';"&gt;
              &lt;td width="110" bgcolor="#E8E8E8" class="results_text"&gt;&lt;?php echo "$date"; ?&gt; &amp;nbsp;&lt;/td&gt;
              &lt;td width="137" bgcolor="#E8E8E8" class="results_text"&gt;&lt;?php 
            //Get First Part Of COmpany Address ///
           $descr = $row['descr'];
           $address = $row['address'];
           $referer = $row['referer'];
           $ip = $row['ip'];
           $ip3 = $row['ip'];
           $id = $row['id'];
           $add_name = $row['descr'];
           $cname  = "$add_name";
           $pieces = explode(" ", $cname);
           echo $pieces[0]; // piece1
           echo "\n"; //Add space between results
           echo $pieces[1]; // piece2
             ?&gt;
                &amp;nbsp;&lt;/td&gt;
              &lt;td width="125" bgcolor="#E8E8E8" class="results_text"&gt;&lt;?php echo "$ip"; ?&gt;&amp;nbsp;&lt;/td&gt;
              &lt;td width="397" bgcolor="#E8E8E8" class="results_text"&gt;&lt;?php echo "$descr"; ?&gt;&amp;nbsp;&lt;/td&gt;
              &lt;td width="239" bgcolor="#E8E8E8" class="results_text"&gt;&lt;?php echo "$address"; ?&gt;&amp;nbsp;&lt;/td&gt;
              &lt;td width="167" bgcolor="#E8E8E8" class="results_text"&gt;&lt;div align="center"&gt;&lt;a href="#" id="trigger"&gt;ADD DETAILS&lt;/a&gt;&lt;/td&gt;
              &lt;td width="97" bgcolor="#E8E8E8" class="results_text"&gt;&lt;div align="center"&gt;&lt;?php echo "&lt;input type='checkbox' name='ip[]' value='$row[ip]'/&gt;"; ?&gt;&lt;/div&gt;&lt;/td&gt;
              &lt;td width="124" bgcolor="#E8E8E8" class="results_text"&gt;&lt;div align="center"&gt;&lt;?php echo "&lt;input type='checkbox' name='in[]' value='$row[ip]'/&gt;"; ?&gt;&lt;/div&gt;&lt;/td&gt;
            &lt;/tr&gt;
          &lt;/table&gt;
        &lt;div id="box"&gt;
        &lt;a href="#" class="close"&gt;[x]&lt;/a&gt;
 &lt;form action="" method="get"&gt;
            &lt;table width="95%" border="1"&gt;
 &lt;tr&gt;
  &lt;td width="9%" class="text1"&gt;IP Address:&lt;/td&gt;
  &lt;td width="22%"&gt;&lt;input type="text" name="ip5" id="ip5" value="&lt;?php echo "$ip3"; ?  &gt;" /&gt;&lt;/td&gt;
 &lt;td width="8%" class="text1"&gt;Company Name:&lt;/td&gt;
 &lt;td width="21%"&gt;&lt;input name="company_name" type="text" id="company_name" size="50" /&gt;&lt;/td&gt;
 &lt;td width="9%" class="text1"&gt;Web Address:&lt;/td&gt;
 &lt;td width="25%"&gt;&lt;input name="web_address" type="text" id="web_address" size="50" /&gt;&lt;/td&gt;
 &lt;td width="6%"&gt;&amp;nbsp;&lt;/td&gt;
 &lt;/tr&gt;
 &lt;tr&gt;
 &lt;td class="text1"&gt;Email Address&lt;/td&gt;
 &lt;td&gt;&lt;input name="email_address" type="text" id="email_address" size="50" /&gt;&lt;/td&gt;
 &lt;td class="text1"&gt;Region:&lt;/td&gt;
 &lt;td&gt;&lt;input type="text" name="address" id="address" /&gt;&lt;/td&gt;
 &lt;td class="text1"&gt;City:&lt;/td&gt;
 &lt;td&gt;&lt;input type="text" name="postcode" id="postcode" /&gt;&lt;/td&gt;
 &lt;td&gt;&lt;div align="center"&gt;
  &lt;input type="submit" name="send_details" id="send_details" value="Update" /&gt;
 &lt;/div&gt;&lt;/td&gt;
 &lt;/tr&gt;
 &lt;/table&gt;
  &lt;/form&gt;
            &lt;/div&gt;
</code></pre>

<p>I am guessing that it's because the collapsable box doesn't have it's own id but i am a newbie with jquery etc and so any suggestions would be helpful.</p>

<p>Thanks</p>

<p>Lee</p>
