Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

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.

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)