Code Monkey home page Code Monkey logo

Comments (3)

fieg avatar fieg commented on June 9, 2024 1

Thank you for using IAS this long! Let me try to answer your questions.

  1. 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).

  2. 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);
    });
  3. 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.

Swallowtail23 avatar Swallowtail23 commented on June 9, 2024 1

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.

Swallowtail23 avatar Swallowtail23 commented on June 9, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.