title: Get text value of html elements with same #Id
body: <pre><code>&lt;a id="s_6_2_19_0_mb" class="siebui-ctrl-drilldown" name="Name" rowid="1" href="javascript:void(0)"&gt;00102400010630001&lt;/a&gt;
  &lt;a id="s_6_2_19_0_mb" class="siebui-ctrl-drilldown" name="Name" rowid="2" href="javascript:void(0)"&gt;00102402608820001&lt;/a&gt;
  </code></pre>
  
  <p>I need to get the text values of both these elements. so I use the following code:</p>
  
  <pre><code>$('a#s_6_2_19_0_mb[rowid="1"]').text();
  $('a#s_6_2_19_0_mb[rowid="2"]').text();
  </code></pre>
  
  <p>But the #Id will differ from page to page. So I am getting the id in a variable, say "idVal". And idVal = s_6_2_19_0_mb. So now to get the text value I used the below code</p>
  
  <pre><code>$('\'a' +'#'+idVal+'\[rowid\=\"1\"]'+'\'').text();
  </code></pre>
  
  <p>But this throws me an error. Please let me know how to extract the text value using a variable for #id in the above case</p>