title: Get value of anchor tag in jquery which generate dynamically?
body: <p>I have a functionality where i have <code>anchor</code> tags that generate dynamically. 
  Now i have a next button which onclick would generate another anchor tag For eg : <code>8</code> if the last digit is <code>7</code>.</p>
  
  <p>For Eg:</p>
  
  <pre><code>&lt;a id="a1" href="#"&gt;4&lt;/a&gt;
  &lt;a id="a2" href="#"&gt;5&lt;/a&gt;
  &lt;a id="a3" href="#"&gt;6&lt;/a&gt;
  </code></pre>
  
  <p>I know by using the below code i can get the anchor value</p>
  
  <pre><code> $('#a1').click(function () {
          alert($(this).text());
      });
  </code></pre>
  
  <p>On click of <code>next</code> button i append another:</p>
  
  <pre><code>&lt;a id="a3" href="#"&gt;7&lt;/a&gt;
  </code></pre>
  
  <p>But i have more than 100 anchor tags getting generated(Consider a paginator i keep clicking next button). I cant hardcode the functions for 100 anchor tags. Is there any approach or generic method that i can use to get values of anchor tag?</p>