Simple jQuery but can't get it working
<p>So the following code:</p>

<pre><code>$product_id = $(this).parent().parent().html();
</code></pre>

<p>Produces this:</p>

<pre><code>&lt;div class="right"&gt;
   &lt;input value="6" name="quantity" id="" maxlength="2" type="text"&gt;
   &lt;label&gt; Places required&lt;/label&gt;
   &lt;p class="btn update"&gt;Update&lt;/p&gt;
   &lt;input name="product_id" value="2" class="product_id" type="hidden"&gt;
   &lt;p class="btn remove"&gt;Remove from basket&lt;/p&gt;
&lt;/div&gt;
&lt;a href="/product//"&gt;&lt;img src="http://dummyimage.com/100x100/333/eee" alt="" class="border-thick shadow"&gt;&lt;/a&gt;
&lt;div class="left"&gt;
   &lt;h5&gt;Title&lt;/h5&gt;
   &lt;select name="courses_details_id"&gt;
      &lt;option value=""&gt;Select date/venue...&lt;/option&gt;
      &lt;option value="6"&gt;10 Oct 2011 - Chicago, USA&lt;/option&gt;
      &lt;option value="4"&gt;13 Oct 2011 - Hastings&lt;/option&gt;
      &lt;option value="2"&gt;18 Nov 2011 - Paris, France&lt;/option&gt;
   &lt;/select&gt;
   &lt;br&gt;
   &lt;p class="price"&gt;&lt;span class="small"&gt;From&lt;/span&gt; £77.88&lt;/p&gt;
&lt;/div&gt;
</code></pre>

<p>And I simply want to get the value for product_id, so this makes sense:</p>

<pre><code>$('#basket li form select[name=courses_details_id]').change( function(){    
    $(this).parent().parent().children("input[name$=product_id]").val();
});
</code></pre>

<p>but it returns a value of undefined</p>
