views:

133

answers:

2

Hi,

I am looking for solution where using jquery I want to display 5 records per page and need Next/Prev functionality. So when user click on next button or image it will fetch data from PHP, Mysql and displays it.

SO kind of pagination but using Next/Prev

Thanks & Regards, web programmer

+3  A: 

Your question is not very detailed, but I'll take a swing at it. Datatables is a great plugin for jQuery that will display records in a table. It supports pagination, with Next & Previous buttons. Check it out at www.datatables.net

You can see an example of the Next & Previous pagination here.
You can see an example of PHP serving data to datatables here.

John Gully
+1 for Datatables, love that plugin, need html not htm on your example link for next prev pagination
Luke
basically my question is same like this post http://stackoverflow.com/questions/3383840/jquery-pagination-questionin my case i want to display data in DIV tag, 5 records in 5 div tags then on click of Next button it will call PHP page and it will show next 5 records
Nagy
Datatables will paginate data serverd by PHP as you are requesting. however it does so using tables to display the data. Please update you question with more specific requirements if this does not meet your needs. I have updated my response with a link to the Datatables PHP example
John Gully
I'm using this right now, it's amazing.
@nagy You don't want to display tabular data using divs, it's not bad design to use a table to display table data.
A: 

If you are using jQuery, look at the tablesorter plugin (along with the pager plugin as well)

Joseph
no i am not looking for tablesorter
Nagy