Welcome Guest, Not a member yet? Register   Sign In
twitter like pagination
#1

[eluser]osama[/eluser]
Hi friends ,
I'm New to CI . I'd like to know how to make a twitter like pagination in codeigniter,
That's an example for what i want
http://demos.9lessons.info/loadmore.php
any help
I'll be Grateful:-)


#2

[eluser]skunkbad[/eluser]
This would be extremely simple to pull off, but it is not really pagination. On initial pageload, you would count all records in the database, and show the data for the first 10 records. If the count is higher than 10, you show the more button. When the more button is clicked, use JS to count what you have now, then do an ajax request for the next ten records, starting with the count +1. Pass the current number along with the ajax request so that you have an offset for your query. When you have reached the count from the initial pageload, disable or hide the more button.
#3

[eluser]osama[/eluser]
[quote author="skunkbad" date="1344096167"]This would be extremely simple to pull off, but it is not really pagination. On initial pageload, you would count all records in the database, and show the data for the first 10 records. If the count is higher than 10, you show the more button. When the more button is clicked, use JS to count what you have now, then do an ajax request for the next ten records, starting with the count +1. Pass the current number along with the ajax request so that you have an offset for your query. When you have reached the count from the initial pageload, disable or hide the more button.[/quote]

I'll try but if you show me an Example It will be Great work .
thanks, :-)




Theme © iAndrew 2016 - Forum software by © MyBB