title: How to select unique value of element with same id using jQuery
body: <pre><code>&lt;c:forEach var="projects" items="${projectList}"&gt;
      &lt;tr&gt;
          &lt;td class="font "&gt;
              &lt;a href="#" id="projectname" name="projectname" class="testone" &gt;${projects.name}&lt;/a&gt;
          &lt;/td&gt;
          &lt;input type="hidden" id="hello" value="${projects.projid}"/&gt;
      &lt;/tr&gt;                     
  &lt;/c:forEach&gt;
  </code></pre>
  
  <p>Basically, my code iterates one value from the database to the next. Specific to mention, the INPUT in <code>&lt;input type="hidden" id="hello" value="${projects.projid}"/&gt;</code> changes its value each iteration. However, when i select it through jQuery, i cannot get the 2nd value of PROJID from the database. </p>
  
  <p>Here's my jquery</p>
  
  <pre><code>$(document).ready(function(){
      $('#projectname').click(function(){
          $(this).each(function(i){
              var choice = $('#hello').val()  
              $('#right').load('show_project_details',{projectid:choice});
          });
      });
  });
  </code></pre>
  
  <p>I know that selecting with an ID is restrained to the first element but doesnt my code have a work around? I'm really trying to avoid radio buttons.</p>
  
  <p>If you have the time please do reply. Thank you very much!</p>