HTML CODE:
<div id="prev-next" class="clearfix"> <a class="page-numbers" href="http://example.com/category/blog/">1</a> <a class="page-numbers" href="http://example.com/category/blog/page/2/">2</a> <a class="page-numbers" href="http://example.com/category/blog/page/3/">3</a> <a class="page-numbers" href="http://example.com/category/blog/page/10/">4</a> <a class="page-numbers" href="http://example.com/category/blog/page/10/">5</a> </div>
SCRIPT
$('a.page-numbers').live( 'click', function(e){ e.preventDefault(); $( '#loading' ).show(); var link = $( this ).attr( 'href' ); $( '#loop' ).animate({ opacity:0.1 }, 200, function(){ $( this ).load( link + ' #loop', function() { $( '#loading' ).hide(); $( this ).animate({opacity: 1},200); }); }); return false; });
Leave a Reply