jQuery - Selector for duplicate ID's
<p>I have a page with duplicate ID's for a form element.  The catch is I the elements show up separately based on a toggle. So both ID's never show up simultaneously.</p>

<p>However when I do form validation on that element, it always selects the element displayed last in the code (even if its hidden).</p>

<p>Is there a selector to select the visible duplicate ID?</p>

<p>I've tried the following but to no avail:</p>

<pre><code>$('#my_element:visible').val();
</code></pre>
