{"id":20691353,"url":"https://github.com/metafizzy/flickity-bg-lazyload","last_synced_at":"2025-03-11T01:26:21.324Z","repository":{"id":57238381,"uuid":"61886554","full_name":"metafizzy/flickity-bg-lazyload","owner":"metafizzy","description":"Flickity lazyload background images","archived":false,"fork":false,"pushed_at":"2023-07-19T11:08:04.000Z","size":47,"stargazers_count":31,"open_issues_count":3,"forks_count":4,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-03-05T05:39:27.943Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"HTML","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/metafizzy.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2016-06-24T13:31:08.000Z","updated_at":"2023-09-25T22:50:34.000Z","dependencies_parsed_at":"2024-06-18T21:53:06.066Z","dependency_job_id":null,"html_url":"https://github.com/metafizzy/flickity-bg-lazyload","commit_stats":{"total_commits":11,"total_committers":4,"mean_commits":2.75,"dds":0.2727272727272727,"last_synced_commit":"d9bc0e3fcff16f9fba9a6c244c1b4ff2a8dd8f14"},"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/metafizzy%2Fflickity-bg-lazyload","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/metafizzy%2Fflickity-bg-lazyload/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/metafizzy%2Fflickity-bg-lazyload/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/metafizzy%2Fflickity-bg-lazyload/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/metafizzy","download_url":"https://codeload.github.com/metafizzy/flickity-bg-lazyload/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":242953378,"owners_count":20212010,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-16T23:16:22.357Z","updated_at":"2025-03-11T01:26:21.298Z","avatar_url":"https://github.com/metafizzy.png","language":"HTML","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Flickity background lazyload\n\nLazyload background images of selected cells.\n\n## Install\n\nAdd `bg-lazyload.js` to your scripts.\n\n### Download\n\n[bg-lazyload.js](https://unpkg.com/flickity-bg-lazyload@2/bg-lazyload.js)\n\n### CDN\n\n``` html\n\u003cscript src=\"https://unpkg.com/flickity-bg-lazyload@2/bg-lazyload.js\"\u003e\u003c/script\u003e\n```\n\n### Package managers\n\nnpm: `npm install flickity-bg-lazyload`\n\nYarn: `bower add flickity-bg-lazyload`\n\n## Usage\n\nSet `data-flickity-bg-lazyload` attribute of the cell to the background image's url.\n\n``` html\n\u003cdiv class=\"carousel\"\u003e\n  \u003cdiv class=\"carousel-cell\" data-flickity-bg-lazyload=\"oranges.jpg\"\u003e\u003c/div\u003e\n  \u003cdiv class=\"carousel-cell\" data-flickity-bg-lazyload=\"submerge.jpg\"\u003e\u003c/div\u003e\n  \u003cdiv class=\"carousel-cell\" data-flickity-bg-lazyload=\"cat-nose.jpg\"\u003e\u003c/div\u003e\n\u003c/div\u003e\n```\n\nSet `bgLazyLoad` option.\n\n``` js\n// lazyloads background image of selected cell\n// jQuery\nlet $carousel = $('.carousel').flickity({\n  bgLazyLoad: true\n});\n```\n\n``` js\n// vanilla JS\nlet flkty = new Flickity( '.carousel', {\n  bgLazyLoad: true\n});\n```\n\nSet `bgLazyLoad` to a number to load images in adjacent cells.\n\n``` js\nbgLazyLoad: 2\n// load background images in selected cell\n// and next 2 cells\n// and previous 2 cells\n```\n\n### Webpack\n\n``` js\nconst Flickity = require('flickity');\nrequire('flickity-bg-lazyload');\n\nlet flkty = new Flickity( '.carousel', {\n  bgLazyLoad: true\n});\n```\n\n---\n\nBy [Metafizzy 🌈🐻](https://metafizzy.co)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmetafizzy%2Fflickity-bg-lazyload","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmetafizzy%2Fflickity-bg-lazyload","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmetafizzy%2Fflickity-bg-lazyload/lists"}