Comments (6)
Hi,
Thanks :)
This plugin offers only client side pagination, at least for now, maybe I'll add Ajax support in future releases.
I believe you're trying to paginate all the records in your DB but you can only apply the plugin to items that are already loaded in the page, so it won't work.
But you can always re-apply the plugin after an Ajax call. Is that what you're trying to do?
from jpages.
man,
thanks alot for the answer,
the problem is as you have said i am trying to paginate the database, and as you said the plugin will only paginate on client side, but what i want is to speed up things and only return 10 items per page, the only thing missing is to make the plugin able to inject number of pages based on total number of database records so each time you click on a page number a new request happens and you see the next batch of returned items.
from jpages.
Hi,
You're right! It's something I want to add in the future since it would make the plugin much more flexible.
But for now it's not possible since it's only a client side pagination plugin.
Stay tuned for future releases cos when I have some time I'll add Ajax requests.
from jpages.
thanks alot man,
i cant wait really, i want to replace all the stupid once i have tried and replaced with this beauty.
all the best on your endeavor :)
from jpages.
I'm facing the same problem here but i think the best solution is to "apply the plugin to items" as luis said. but surely we are waiting your Smart solution & Update.
from jpages.
I know this is an old thread, but I found a solution at least for how I'm using jPages.
In my case, I am simply using ajax to return a list of items (in other words, I'm pulling my items at once and just want to paginate the results). I dug around some jQuery documentation and found out about ajaxSuccess. The following code works for me, and perhaps it could be helpful to someone else.
jQuery(document).ajaxSuccess(function(event, request, settings) {
jQuery(function($) {
addScript($this->filePaths->js_plugins.'jPages.min.js') ?>
$("div.holder").jPages({
containerID: "searchlist"
});
});
})
Code is taken from my Joomla script (hence the 'addScript' call) but the basic principle is simple. Upon ajax success embed jPages and then invoke it. Hopefully someone can tweak this and make it better. I'm just happy that I can keep using jPages. :)
from jpages.
Related Issues (20)
- Pagination not working if not in active tab? HOT 3
- Other version of Jquery
- How to show only previous and next title link HOT 1
- new value for links
- Implement "1 - 10 of 40 Items" HOT 1
- page refresh loads 1st page HOT 1
- stop on mouse hover
- Project page broken
- Unable to paginate buttons after <section> with id HOT 1
- Doesn't respect element item's display property rule HOT 1
- why only show two pages
- Add git tags
- Which files need to be hosted?
- clash with tabs in bootstrap
- jPages is not a function HOT 1
- Doesn't work when load via ajax callback in div selector HOT 1
- Events
- Not compatible with jQuery 3
- Nodejs integration
- jPages works only after ajax request, not on page load HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from jpages.