tags:

views:

56

answers:

1

I am trying to implement the cakephp ajax pagination and it's working fine expect for one problem. the layout is repeating again but only once. What i mean is that first time i click on the pagination link(next/prev/no) the layout repeats again but if i click any pagination link the layout doesn't.

I have followed the tutorial given on the cakephp's website. Please tell me what wrong am i doing. Any answer

A: 

Look this post. It uses jQuery and obviously you don't need livequery anymore. your case should be:

<?php
echo $javascript->link('jquery.min');
?>

and then the javascript file will be:

$('a[href*=/sort:],a[href*=/page:]').live('click', function(){
    $('#content').load($(this).attr('href'));
    return false;
});

Bear in mind that you have to use RequestHandler Component

Nik