I have created a piece of code for a live pagination, but I don't like the code. It works it does the job, but I guess I could done it better.
$('.show-content').livequery(function() {
$(this).find('.page-me:not(:first)').hide();
var totalPage = $(this).find('.page-me').length;
for (var i = 0; i <= totalPage - 1; i++) {
$('.modal-pagination').append('<a href="#" id="' + i + '">Page ' + (i + 1) + '</a>')
}
$('.modal-pagination a').live('click', function() {
var thePag = $(this).attr('id');
$('.show-content').find('.page-me').hide();
$('.show-content').find('.page-me:nth(' + thePag + ')').show();
return false;
});
});