Problem with AJAX calls in pagination

I am having an issue with loading data into a view after an AJAX request has been. I checked Firebug and the ajax call returns 200 OK, but no new data is loading, it just shows the same data and the page links dont change, i.e. only stays on page 1.



// Functon to Show out Busy Div
function showBusy(){
message: ‘<h1>Processing</h1>’,
css: {border:‘3px solid #000’}

function updatePage(html){

window.setTimeout( function(){
}, 2000)


$(document).ready(function() {

// $.AJAX Example Request
$('#ajax-pag').live('click', function(eve){
    var link = $(this).attr('href');
        url: link,
        type: "GET",
        dataType: "html",
        beforeSend: function(){
          success: function(html) {



<!–end header –>
<div id=“ajax-content”>

    foreach ($results as $r){
        &lt;div class="search_result"&gt;
            &lt;div&gt;&lt;?php echo $r-&gt;address;?&gt;&lt;/div&gt;
            &lt;div&gt; &lt;?php echo $r-&gt;email;?&gt;&lt;/div&gt;
        echo'&lt;ul id="ajax-pag"&gt;';
        echo $pag_links;
        echo '&lt;/ul&gt;';



class Search extends CI_Controller {

	function __construct()
		parent:: __construct();
	function index($offset='')
		$limit = 2;
		$data_count = $this-&gt;Rooms_model-&gt;count_search_results();
		$config['base_url'] = base_url().'/index.php/search/index';
		$config['total_rows'] = $data_count;
		$config['per_page'] = $limit;
		$data['results'] = $this-&gt;Rooms_model-&gt;all_search_results($limit,$offset);
		//create array to pass to view
		$data['pag_links'] = $this-&gt;pagination-&gt;create_links();
		if (!empty($_SERVER['HTTP_X_REQUESTED_WITH']))


Hai condo,
it would have been very easier to read your code if you had warped it in the code tags.