[jQuery] Pagination ajax
[jQuery] Pagination ajax
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=iso-8859-1">
<META content="MSHTML 6.00.6000.16414" name=GENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=#ffffff>
<DIV><FONT face=Arial size=2>i have a block with css button like a
pagination</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>code:</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2><div class="clearfix
paginacion"><BR> <div
class="nav_paginacion"><BR> <ul><BR>
<li><a href="comment.php?p=1" class="actual
aP">1</a></li><BR> <li><a
href="comment.php?p=2" class="btn_navega
aP">2</a></li><BR> <li><a
href="comment.php?p=3" class="btn_navega
aP">3</a></li><BR> <li
class="last"><a href="comment.php?p=3" class="btn_navega
aP">Last</a></li><BR> <li><a
href="comment.php?p=4" class="btn_navega2 aP">Next
»</a></li><BR> </ul><BR>
</div><BR></div></FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>and i have this script</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial
size=2>$(document).ready(function(){ <BR> navigation();<BR>});</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>function navigation() {<BR> $('.nav_paginacion
ul li a').each(function(i)
{<BR> $(this).click(function(){ <BR> $.get(<BR> this.href,<BR> function(data){<BR>
$("#comment_block").html(data);<BR> },<BR> ); <BR> return
false;<BR> });<BR> <BR> });<BR>}</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV><FONT face=Arial size=2>
<DIV><BR>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<BR>the
script again to have the same behaviour, because i lose it when i get those new
comments via ajax.</DIV>
<DIV> </DIV>
<DIV>Any idea?</FONT></DIV>
<DIV><FONT face=Arial size=2><BR></FONT> </DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV><!-- SPAMfighter Signature -->
<hr>Estoy utilizando la versión gratuita de SPAMfighter para usuarios privados.<br />Ha eliminado 1337 correos spam hasta la fecha.<br />Los abonados no tienen este mensaje en sus correos.<br />¡Pruebe <a href="http://www.spamfighter.com/les">SPAMfighter</a> gratis ya!<br /></BODY></HTML>