Comments (3)
Thank you for using IAS this long! Let me try to answer your questions.
-
npm vs cdn: if you want to use it with npm, you also need to transpile the code using webpack, for example. Or you could take the already transpiled/minified code from the dist folder (that's the equivalent of using the code on CDN).
-
history support: you would need a small snippet to add the current page to the browser's url in order for this to work:
// update title and url then scrolling through pages ias.on('page', (e) => { document.title = e.title; let state = history.state; history.replaceState(state, e.title, e.url); });
-
scrolling up when coming back: sadly this is something I haven't solved yet in v3. v2 did this by presenting a link which you could click to load the previous page.
from infinite-ajax-scroll.
I've added a quick and dirty javascript that looks at the URL when the page is loaded, and if "page > 1" it loads my "go to top" button, so that addresses 3.
For 2, I have copied the dist script to local, and it works - so all good there.
I'll close this - thanks Jeroen.
from infinite-ajax-scroll.
Thanks Jeroen, I've implemented 2. Only problem is that because of 3. it drops you back where you were (great) but you can't scroll back up (not so great lol). I'll have to have a think about which is the lesser UX issue :)
On 1, I'll test that out later... Any issues just using it from CDN? Any availability downtime?
On 3. I could probably present a button/link with previous page in a javascript div. Hmmm... will have a think. Even a "go to top" could work...
from infinite-ajax-scroll.
Related Issues (20)
- Is there any way to make this work with dynamic content like pjax or htmx HOT 3
- Exclude the 'javascript:;' from the next url HOT 5
- Get next from JSON HOT 5
- Bind on load (DOMContentLoaded)
- Regularly and randomly failing resize test
- Accessibility and Keyboard Navigation HOT 9
- VueJS support/example
- Doesnt work if link includes Get request (?srch=value) HOT 2
- Limit the number of items HOT 1
- Not able to reload after ajax content load. HOT 1
- After form POST or GET result pagination not working HOT 2
- Prevent the url from changing when scrolling or in other words, the url stays at the same address? HOT 1
- Element ".pager__prev" not found for "options.prev
- Use item selector with ::last
- Prevent to close HTML Tags in appendFn
- <video> not loading in firefox HOT 1
- Loading duplicate pages on refreshing or going back to page
- Using scrollcontainer creates Js error on unbind
- Unhandled Promise Rejection: TypeError: null is not an object (evaluating 't[o].sentinel.getBoundingClientRect') infinite-ajax-scroll.min.js:11:11548
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-ajax-scroll.