2011-07-13 15 views
0

次のコードを使用すると、毎回ページが更新され、次をクリックします。 私は何を望みますか>毎回のページをリフレッシュしないでください。divだけが更新されます。 cakephp1.3のjQueryページ番号

この

var $components = array('RequestHandler'); 
var $helpers = array('Html','Form','Javascript'); 
var $paginate = array('limit'=>'8'); 
function pagination_viewall() 
{ 
    $this->layout = NULL; 
    $arrdailyvideos = $this->paginate();   
    $this->set('arrdailyvideos', $arrdailyvideos); 
    if ($this->RequestHandler->isAjax()) { 
     $this->render("viewall"); 
     return; 
    } 

} 

あなたはこのQUEのための任意のリンクを持っている場合は、ここで

答えて

0

ポスト私はあなたを助けるだろうが、あなたのJSをデバッグしている私のコントローラの下には私の見解

 <script type="text/javascript"> 

     $(document).ready(function() { 
     loadPiece("<?php echo $html->url(array('controller'=>'daily_videos','action'=>'pagination_viewall'));?>","#container-box"); 

     var href = <?php echo $html->url(array('controller'=>'daily_videos','action'=>'pagination_viewall'));?>; 
     var divName = "container-box"; 
     var divPaginationLinks = "container-box #pagination a"; 

      $(divPaginationLinks).click(function() { 
       var thisHref = $(this).attr("href"); 
       // loadPiece(thisHref,divName); 

       $("#container-box").load(thisHref); 
       return false; 
      }); 

     }); 
</script> 

    <div id="container-box" class="clearfix"> 
    </div> 

ですコード?

$().ready(function() { 
    $('#container-box #pagination a').live('click', function(e){ 
    // Add a class loading to the container box 
    $('#container-box').addClass('loading'); 

    // Get the data from the link into the container box 
    $('#container-box').load($(this).attr('href'), function() { 
     // Remove the loading class again 
     $(this).removeClass('loading'); 
    }); 

    // Stop the default action, following this link 
    e.preventDefault(); 
    }); 
}); 
:私がこれを行うための適切な方法は、以下のTEのようなものになると思います

(..などなしloadPiece機能、「」なしURL文字列、)エラーの完全に思えます