title: jquery anchor click doesn't seem to work
body: <p>Here is function ,</p>
  
  <pre><code> &lt;script type="text/javascript"&gt;
      $(document).ready(function() {
          getRecordspage(1, 5);
          $("a.page-numbers").click(function() {
              alert(1);
              getRecordspage($(this).text(), 5);
              return false;
          });
      });
  </code></pre>
  
  <p></p>
  
  <p>And in my page i am appending anchors dynamically to this div,</p>
  
  <pre><code>&lt;div id="pager" class="pager"&gt;
  //my anchors will be present here...
  &lt;/div&gt;
  </code></pre>
  
  <p>i am appending anchors dynamically... All anchors will have <code>class="page-numbers"</code>... How it can be done...</p>
  
  <p>When inspected through <code>firebug</code> my pager div had this when i clicked <code>3</code>,</p>
  
  <pre><code>&lt;div class="pager" id="pager"&gt;
  &lt;a class="page-numbers prev" href="#"&gt;Prev&lt;/a&gt;
  &lt;a class="page-numbers" href="#"&gt;1&lt;/a&gt;
  &lt;a class="page-numbers" href="#"&gt;2&lt;/a&gt;
  &lt;span class="page-numbers current"&gt;3&lt;/span&gt;
  &lt;a class="page-numbers" href="#"&gt;4&lt;/a&gt;
  &lt;a class="page-numbers next" href="#"&gt;Next&lt;/a&gt;&lt;/div&gt;
  </code></pre>
  
  <p><strong>EDIT:</strong></p>
  
  <p>I using jquery 1.4...</p>
  
  <pre><code>function getRecordspage(curPage, pagSize) {
      $.ajax({
          type: "POST",
          url: "Default.aspx/GetRecords",
          data: "{'currentPage':" + curPage + ",'pagesize':" + pagSize + "}",
          contentType: "application/json; charset=utf-8",
          dataType: "json",
          success: function(jsonObj) {
              var strarr = jsonObj.d.split('##');
              var jsob = jQuery.parseJSON(strarr[0]);
              var divs = '';
              $.each(jsob.Table, function(i, employee) {
                  divs += '&lt;div class="resultsdiv"&gt;&lt;br /&gt;&lt;span class="resultName"&gt;' + employee.Emp_Name + '&lt;/span&gt;&lt;span class="resultfields" style="padding-left:100px;"&gt;Category&amp;nbsp;:&lt;/span&gt;&amp;nbsp;&lt;span class="resultfieldvalues"&gt;' + employee.Desig_Name + '&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span id="SalaryBasis" class="resultfields"&gt;Salary Basis&amp;nbsp;:&lt;/span&gt;&amp;nbsp;&lt;span class="resultfieldvalues"&gt;' + employee.SalaryBasis + '&lt;/span&gt;&lt;span class="resultfields" style="padding-left:25px;"&gt;Salary&amp;nbsp;:&lt;/span&gt;&amp;nbsp;&lt;span class="resultfieldvalues"&gt;' + employee.FixedSalary + '&lt;/span&gt;&lt;span style="font-size:110%;font-weight:bolder;padding-left:25px;"&gt;Address&amp;nbsp;:&lt;/span&gt;&amp;nbsp;&lt;span class="resultfieldvalues"&gt;' + employee.Address + '&lt;/span&gt;&lt;/div&gt;';
              });
              $("#ResultsDiv").append(divs);
              $(".pager").pagination(strarr[1], { 
                  current_page: curPage - 1, items_per_page: '5', num_display_entries
  : '5', next_text: 'Next', prev_text: 'Prev', num_edge_entries: '1'
              });
              $(".resultsdiv:even").addClass("resultseven");
              $(".resultsdiv").hover(function() {
                  $(this).addClass("resultshover");
              }, function() {
                  $(this).removeClass("resultshover");
              });
          }
      });
  </code></pre>