Jquery how to get a hiddeninput given a data attribute
<p>I have some checkboxes with class mycheckbox and a html5 attribute position.</p>

<p>For every checkbox of this class that is checked I want to get the related hidden input with class header that has the same html5 attribute value for data-position. I want to make a list of the values of the hiddenfields.</p>

<p>So a checkbox would look like this</p>

<pre><code>&lt;input type="checkbox" class="mycheckbox" data-position="@item.Position"/&gt;
</code></pre>

<p>and a hidden input wuold look like this:</p>

<pre><code>&lt;input type="hidden" data-position="@item.Position" /&gt;
</code></pre>

<p>So I came up with:</p>

<pre><code>$('input:checkbox.mycheckbox:checked').each(function () {
   var position = $(this).data('position');
   $('input:hidden.header[data-position=need somehow to get position in here]').each(function () {



   });

 });
</code></pre>

<p>So I'm unsure how to specify the position value from the checkbox in the search for the hidden elements and also how to set the values from each hidden field to a list</p>
