No description
Find a file
2020-11-26 23:38:32 +01:00
.github Update FUNDING.yml 2020-11-22 02:06:22 +01:00
dist Updates README.md and dist 2020-01-25 23:50:25 +03:00
example Update index.html 2020-01-26 00:18:56 +03:00
src Updates README.md and dist 2020-01-25 23:50:25 +03:00
test Init the app 2020-01-25 23:31:10 +03:00
.editorconfig Init the app 2020-01-25 23:31:10 +03:00
.gitattributes Init the app 2020-01-25 23:31:10 +03:00
.gitignore Init the app 2020-01-25 23:31:10 +03:00
.travis.yml Updates .travis.yml 2020-01-25 23:56:35 +03:00
LICENSE Init the app 2020-01-25 23:31:10 +03:00
package.json Merge branch 'master' into renovate/major-jest-monorepo 2020-11-26 23:38:03 +01:00
README.md Fixes typo 2020-03-27 23:22:29 +03:00
renovate.json Add renovate.json 2020-01-25 20:59:12 +00:00
yarn.lock Merge pull request #22 from suyalcinkaya/dependabot/npm_and_yarn/dot-prop-4.2.1 2020-11-26 23:38:32 +01:00

koala + lazy + kolay (means "easy" in Turkish) = koalazily 🐨

Loading images lazily in a modern way using Intersection Observer API

npm npm Travis (.org) NPM PRs Welcome Greenkeeper badge

Install

With package manager:

$ npm install koalazily

# OR

$ yarn add koalazily

Or with CDN:

<script src="https://unpkg.com/koalazily@1.0.0/dist/koalazily.umd.js"></script>

Usage

Add the data-koalazily tag to images you wish to load lazily:

<img
  data-koalazily="https://source.unsplash.com/300x200/?house/1"
  width="300"
  height="200"
  alt=""
/>
<img
  data-koalazily="https://source.unsplash.com/300x200/?house/2"
  width="300"
  height="200"
  alt=""
/>
<img
  data-koalazily="https://source.unsplash.com/300x200/?house/3"
  width="300"
  height="200"
  alt=""
/>

Then initialize:

koalazily();

Also see the example.

Contributing

Contributions are welcome!

  1. Fork it.
  2. Create your feature branch: git checkout -b my-new-feature.
  3. Commit your changes: git commit -am 'Adds some feature'.
  4. Push to the branch: git push origin my-new-feature.
  5. Submit a pull request.

Or open an issue.

License

Licensed under the MIT License.