JQuery - Retrieve value from another child element of the same parent
<p>I'm fairly new to JQuery and am having trouble with something that I'm sure is simple.  Here is an example of some html that I'm working with:</p>

<pre><code>&lt;tr&gt;
&lt;td&gt;&lt;div class="testclass"&gt;&lt;p&gt;Test text&lt;/p&gt;&lt;/div&gt;&lt;/td&gt;
&lt;td&gt;&lt;button class="testButton"&gt;Button text&lt;/button&gt;&lt;/td&gt;
&lt;/tr&gt;​
</code></pre>

<p>When the button is clicked, I want to get the value in <code>&lt;p&gt;</code> in a previous cell.  Here's how I'm currently trying to select it:</p>

<pre><code>var text = $(".testButton").parent().parent().closest('p').text();
</code></pre>

<p>Within the <code>onClick</code> function of the button, I've also tried:</p>

<pre><code>$(this).prev('p').text();
</code></pre>

<p>However, it's always <code>null</code>.  I've messed around with jsfiddle for a little while trying to get this right, but no luck.  Any tips would be appreciated.</p>
