jquery function passsing variables
<p>hi i am building a php mysql database pagination page, so i have a list of records 2 rows long at the bottom of the record i want a div which opens up when the span above it is clicked, how do i set up the jquery to make it so that it takes the id of the <code>&lt;p&gt;</code> and expands it in jquery</p>

<pre><code>&lt;span id="button1"&gt;Toggle&lt;/span&gt;

&lt;p id="p1"&gt;
hello&lt;br/&gt;hello
&lt;/p&gt;

&lt;script&gt;
$("#button1").click(function () {
$("#p1").slideToggle("slow");
});
&lt;/script&gt;
</code></pre>

<p>when i output it in php mysql the button will all have a different id and the p will have different ids as well</p>
