3 ms·
Interesting project. I wonder if you might be willing to outline a few use cases?
by johnhenry 10y ago
Interesting project. I wonder if you might be willing to outline a few use cases?
- andrewbarba 10y agoOne of the best use cases is lazy loading expensive data until the div is visible. Image loading, or even fetching a resource. You essentially get this for free in native apps (iOS/Android with recycled views) but there hasn't been a great way to accomplish this on the web. Note: this is definitely not the same as a recycled view. But can help accomplish one aspect
- talklittle 10y agoYes, lazy loading is a good use case. Echo.js (https://github.com/toddmotto/echo https://github.com/toddmotto/echo) is another small no-dependency library (1.89 KB minified), which detects elements appearing on screen, and goes a step further to swap the "src" attribute with a placeholder for lazy loading and unloading. Disclosure: I've submitted a pull request to it.
- tanto 10y agoFor example store img src tag in data-src and then set src when image comes into view. So to say lazy loading of images.
- bikamonki 10y agoFancy animations like fading in/out content when scroll has reached a given element.