Comments (11)
Hi Benoon,
Do you have a test case/example I can view? It'll make resolving the issue a lot easier if we can debug it. Vladikoff's solution doesn't seem to be using the latest version of the plugin and so it won't necessarily have any of the latest bug fixes.
from infinite-scroll.
I've got it locally, just playing around right now.
The link shows ?page=1 but your plugin goes to ?page=2 and the second page is missed.
I use last Drupal and Views 2.
from infinite-scroll.
I know that the script presumes that it's already on page 1 and then goes to page 2; I'll have a look into this as I would have thought the regex would pick this up.
from infinite-scroll.
No, that's wrong then. It's not on page 1. It's like that:
page 1 - http://drupalsite.com/newview/
page 2 - http://drupalsite.com/newview/?page=1
page 3 - http://drupalsite.com/newview/?page=2
....
Also is important to know that when you go after last page you don't get 404.
Example:
last page - http://drupalsite.com/newview/?page=12
then when you manualy add to url the next number - http://drupalsite.com/newview/?page=13 - it goes to page 1 , so the scroll is never ending.
Vladikoff made some improvments and added few lines which takes the number of page from the LAST link and stops scroll on the last page.
//Get the number of pages from the Views Pager (Use the full pager, it will be hidden with .infinitescroll() anyway.)
lastPageHref = $(".pager-last").find('a').attr('href').toString();
lastPageHref = lastPageHref.split("=");
numOfPages = parseInt(lastPageHref[1]);
and then new parameter when initializing your plugin:
pages: numOfPages, //NEW OPTION: number of pages in the Views Pager
I use it right now, so the only problem is that the second page is still passed.
from infinite-scroll.
are you using the pathParse option when calling your instance of infinite scroll?
from infinite-scroll.
no, did I miss something ? is that some kind of parameter ?
from infinite-scroll.
https://github.com/paulirish/infinite-scroll/blob/master/jquery.infinitescroll.js#L338
pathParse allows you to specify the path of the URL for your next selector. i think it was requested for use with drupal, but i'm not entirely sure.
by default, infinite scroll only loads on the first page, not any other paged result. is there a reason why would want to do that? i'm just curious as it could be something we build into the plugin if there's demand for it.
from infinite-scroll.
also, here's how pathParse works.
https://github.com/paulirish/infinite-scroll/blob/master/jquery.infinitescroll.js#L57-62
from infinite-scroll.
i tried something like that:
pathParse : '?page=1',
but it's still the same. Loading ?page=2 as a first one.
"by default, infinite scroll only loads on the first page, not any other paged result. is there a reason why would want to do that?"
not really understand your question. I also want it to improve so believe me I will stay here and will answer any question if understand :)
right now I am going to prepare an example on clean drupal installation just for you to look at.
from infinite-scroll.
Try pathParse : '?page=0',
from infinite-scroll.
up?
from infinite-scroll.
Related Issues (20)
- Learning html
- How can I parse the next/prev links of loaded pages? HOT 1
- standby function with sticky footer HOT 1
- infinite-scroll with websockets
- tile HOT 1
- Items shown and total items under view more button HOT 3
- Fackbook hack
- Infinite scroll + JSON
- Cloudflare mirage data-cfsrc lazy load conflict
- my tumblr theme's images not loading after page 1 (Safari only) - Infinite scroll & load more issue HOT 3
- Feature - Combination with Pagination - Load and Scroll to specific Page
- Page Link Issue
- Card Columns Not Working
- Web App For Iqama status
- Infinite-scroll and Joomla
- View Transitions
- Infinite Scroll + Masonry works only sometimes, sometimes it bugs HOT 1
- prefill loads data endlessly when container has display:none HOT 2
- Deprecating the unload event HOT 2
- Rating of a topic and infinite scroll HOT 1
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 infinite-scroll.