i have a block with css button like a pagination

code:

<div class="clearfix paginacion">
    <div class="nav_paginacion">
 <ul>
     <li><a href="comment.php?p=1" class="actual aP">1</a></li>
     <li><a href="comment.php?p=2" class="btn_navega aP">2</a></li>
     <li><a href="comment.php?p=3" class="btn_navega aP">3</a></li>
     <li class="last"><a href="comment.php?p=3" class="btn_navega 
aP">Last</a></li>
     <li><a href="comment.php?p=4" class="btn_navega2 aP">Next »</a></li>
 </ul>
    </div>
</div>

and i have this script

$(document).ready(function(){
 navigation();
});

function navigation() {
 $('.nav_paginacion ul li a').each(function(i) {
  $(this).click(function(){
   $.get(
    this.href,
    function(data){
       $("#comment_block").html(data);
    },
   );
   return false;
  });

 });
}


On the first click in any button it work ok, i have get the next 5 comments 
inside the div i want, but my problem is that i need to execute
the script again to have the same behaviour, because i lose it when i get those 
new comments via ajax.

Any idea?






--
Estoy usando la versión gratuita de SPAMfighter para usuarios privados.
Ha eliminado 1337 correos spam hasta la fecha.
Los usuarios de pago no tienen este mensaje en sus correos.
Obtenga SPAMfighter gratis aquí: http://www.spamfighter.com/les

Reply via email to