title: jQuery get value of hidden input
body: <p>I've got an ajax call that returns something like this:</p>
  
  <pre><code>&lt;p&gt;
      &lt;a href="javascript:void(0);" class="addressOpt"&gt;
      John Paul Jones                     &lt;br/&gt;
      399 OAK ST          &lt;br/&gt;
      DELROY ND 30254     &lt;br/&gt; 
  
      &lt;input type="hidden" name="XNAME" value="   John Paul Jones"&gt;
      &lt;input type="hidden" name="XADD1" value="399 OAK ST"&gt;
      &lt;input type="hidden" name="XADD2" value=""&gt;
      &lt;input type="hidden" name="XCITY" value="DELROY"&gt;
      &lt;input type="hidden" name="XSTA" value="ND"&gt;
      &lt;input type="hidden" name="XZIP" value="30254"&gt;
      &lt;input type="hidden" name="XPHON" value=""&gt;
      &lt;/a&gt;
  &lt;/p&gt;
  &lt;p&gt;
      &lt;a href="javascript:void(0);" class="addressOpt"&gt;
      John Paul Jones                     &lt;br/&gt;
      2680 PALUMBO DRIVE          &lt;br/&gt;
      LEXINGTON KY 40509      &lt;br/&gt; 
      8592667227  
      &lt;input type="hidden" name="XNAME" value="John Paul Jones"&gt;
      &lt;input type="hidden" name="XADD1" value="2680 PALUMBO DRIVE"&gt;
      &lt;input type="hidden" name="XADD2" value=""&gt;
      &lt;input type="hidden" name="XCITY" value="LEXINGTON"&gt;
      &lt;input type="hidden" name="XSTA" value="KY"&gt;
      &lt;input type="hidden" name="XZIP" value="40509"&gt;
      &lt;input type="hidden" name="XPHON" value="8592667227"&gt;
      &lt;/a&gt;
  &lt;/p&gt;
  </code></pre>
  
  <p>So I want to get every hidden value when any of those links are clicked.</p>
  
  <p>I tried:</p>
  
  <pre><code>$(document).on('click', '.addressOpt', function(e) {
          alert($("[name=XCITY]").val());
  });
  </code></pre>
  
  <p>But always gives me back the value of the first element (DELROY), even if I click the second.</p>
  
  <p>I know I've got to use 'this' but don't know who to use it with the attribute equals selector.</p>
  
  <p>Any help would be appreciated.</p>