how to use prev to get the value of an input field
<p>I have an hidden input field with a value,</p>

<pre><code>   &lt;form&gt;
        &lt;input type="hidden" value="product"/&gt;
        &lt;select class="select" name="select3" id="select3"&gt;
          &lt;option&gt;0&lt;/option&gt;
          &lt;option&gt;1&lt;/option&gt;
          &lt;option&gt;2&lt;/option&gt;
        &lt;/select&gt;
  &lt;/form&gt;
</code></pre>

<p>I need to get the value of input field once a button is clicked but I only get the text object why is that?</p>

<pre><code>      var items[]; 
      $('#my-add-button-sides').click(function() {
  $('.select option:selected').each(function() {
  var $this = $(this);
  items.push($this.prev($('input[type=hidden]').val ()          
             ));


});
</code></pre>

<p>thanks</p>
