title: Codeigniter jquery ajax pagination
body: <p>I get one tutorial over here
  <a href="http://codeigniter.com/forums/viewthread/122597/P0/" rel="nofollow">http://codeigniter.com/forums/viewthread/122597/P0/</a></p>
  
  <p>everything is find but not the pagination link. </p>
  
  <p>here's my code</p>
  
  <pre><code>&lt;script&gt;
      ajax_paging = function()
      {
          $("p.pagination a").click(function() 
          {
              $.ajax({
              type: "GET",
              url: $(this).get(),
              success: function(html)
                       {
                           $("#display-content").html(html);
                       }
              });               
          });            
      return false;
      }; 
  &lt;/script&gt;
  
  &lt;?php 
      if($num_results == 0)
      {
          echo 'No data result, please insert one';
      }
      else
      {
  ?&gt;
          &lt;div id="display-content"&gt;
          &lt;table width="100%"&gt;
          &lt;tr&gt;
              &lt;th&gt;CP code&lt;/th&gt;
              &lt;th&gt;Code&lt;/th&gt;
          &lt;/tr&gt;
      &lt;?php foreach($records as $row){ ?&gt;
          &lt;tr&gt;
              &lt;td align="center"&gt;&lt;?php echo $row-&gt;created_date?&gt;&lt;/td&gt;
              &lt;td align="center"&gt;&lt;?php echo $row-&gt;uid?&gt;&lt;/td&gt;
          &lt;/tr&gt;
      &lt;?php }?&gt;
  &lt;/table&gt;
   &lt;p class="pagination"&gt;
   &lt;?=$pagination?&gt;
      &lt;/p&gt;
      &lt;/div&gt;
  &lt;?php } ?&gt;
  </code></pre>
  
  <p>here the pagination HTML</p>
  
  <pre><code>    &lt;p class="pagination"&gt;
       &amp;nbsp;&lt;strong&gt;1&lt;/strong&gt;&amp;nbsp;
  &lt;a onclick="javascript:ajax_paging();return false;" href="http://bravonet.my/tombocrm/inside/home_fpr/5"&gt;2&lt;/a&gt;&amp;nbsp;
  &lt;a onclick="javascript:ajax_paging();return false;" href="http://bravonet.my/tombocrm/inside/home_fpr/10"&gt;3&lt;/a&gt;&amp;nbsp;
  &lt;a onclick="javascript:ajax_paging();return false;" href="http://bravonet.my/tombocrm/inside/home_fpr/5"&gt;&amp;gt;&lt;/a&gt;&amp;nbsp;    
  &lt;/p&gt;
  </code></pre>
  
  <p>IWhen i try to click on the pagination link it works like normal link only. the javascript ajax occur error.</p>
  
  <p>i am very weak in javascript. any help would be appreciated and thx in advanced.</p>