Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/wibus-wee-ac/nashi.lazy
nashi.lazy is a library for lazy loading images. Powered by nashi.
https://github.com/wibus-wee-ac/nashi.lazy
Last synced: 3 months ago
JSON representation
nashi.lazy is a library for lazy loading images. Powered by nashi.
- Host: GitHub
- URL: https://github.com/wibus-wee-ac/nashi.lazy
- Owner: wibus-wee-ac
- License: mit
- Archived: true
- Created: 2022-12-02T11:29:39.000Z (about 2 years ago)
- Default Branch: main
- Last Pushed: 2023-04-29T09:53:10.000Z (over 1 year ago)
- Last Synced: 2024-05-20T23:30:14.854Z (8 months ago)
- Language: TypeScript
- Homepage:
- Size: 270 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 8
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# Nashi.Lazy
🧪 Working in Progress## What is this?
Nashi.Lazy is a library for lazy loading images. Powered by Nashi.
## Usage
```html
```
```js
let lazyConfig = {
selector: ".lazy", // selector for lazy loading
loaderAttr: "data-src", // attribute for image source
throttle: 100, // throttle time for scroll event, default 100ms
};nashiLazy(lazyConfig);
// or
nashi.lazyimg(lazyConfig);
```## Tips
nashiLazy will find a nashi instance automatically, if you want to use your own nashi instance, you can pass it to nashi.lazy.
```js
nashiLazy(lazyConfig, YourNashiInstance);
// or
nashi.lazyimg(lazyConfig);
```## Author
Nashi.Lazy © Wibus, Released under the MIT License.
> [Personal Website](http://iucky.cn/) · [Blog](https://blog.iucky.cn/) · GitHub [@wibus-wee](https://github.com/wibus-wee/) · Telegram [@wibus✪](https://t.me/wibus_wee)