{"id":25470191,"url":"https://github.com/thinkphp/lazyload","last_synced_at":"2025-11-04T18:30:30.938Z","repository":{"id":1076120,"uuid":"918001","full_name":"thinkphp/lazyload","owner":"thinkphp","description":"A way to load external JavaScript and CSS files on demand.","archived":false,"fork":false,"pushed_at":"2010-09-29T14:14:10.000Z","size":100,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-04-14T14:54:26.086Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"http://thinkphp.ro/apps/js-hacks/lazyload/test/lanyrd%20with%20lazyload%202/","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":"wercker/wercker-kubernetes-quay","license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/thinkphp.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}},"created_at":"2010-09-17T09:40:27.000Z","updated_at":"2023-12-22T06:06:08.000Z","dependencies_parsed_at":"2022-07-06T06:00:10.949Z","dependency_job_id":null,"html_url":"https://github.com/thinkphp/lazyload","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thinkphp%2Flazyload","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thinkphp%2Flazyload/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thinkphp%2Flazyload/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thinkphp%2Flazyload/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/thinkphp","download_url":"https://codeload.github.com/thinkphp/lazyload/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":239437276,"owners_count":19638458,"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":"2025-02-18T08:32:17.400Z","updated_at":"2025-11-04T18:30:30.891Z","avatar_url":"https://github.com/thinkphp.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"LazyLoad\n========\n\nLazyLoad is a tiny (only 818 bytes minified and gzipped), dependence-free\nJavaScript library that makes easy to load external JavaScript and CSS\nfiles on demand. It's ideal for quickly and unobtrusively loading large\nexternal scripts and stylesheets either lazily after the rest of the page\nhas finished loading or a demand as needed.\n\nIn addition to CSS support, this version of LazyLoad also adds support for\nparallel loading of multiple resources in browsers that support it. To load\nmultiple resources in parallel, simply pass an array of URLs in a single\nLazyLoad call.\n\n\nUsage\n-----\nUsing LazyLoad is simple. Just call the appropriate method -- 'css()' to load\nCSS , 'js()' to load JavaScript -- and pass in a URL or array of URLs to load.\nYou can also provide a callback function if you'd like to be notified when the \nresources have finished loading, as well as an argument to pass to the callback\nand a context in which to execute the callback.\n\n           // load a single JavaScript file and execute a callback when it finishes.\n           LazyLoad.js('foo.js', function(){\n               alert('foo.js has been loaded!');\n           });\n\n           // load multiple JS files and execute a callback when they've all finished.\n           LazyLoad.js(['foo.js','bar.js','buzz.js','ninja.js'], function(){\n               alert('All files have been loaded!'); \n           });\n\n           // load a CSS file and pass an argument to the callback function.\n           LazyLoad.css('foo.css',function(arg){\n               alert(arg);\n           },'foo.css has been loaded');\n\n          //load a CSS file and execute the callback in a different scope.\n          LazyLoad.css('foo.css',function(){\n             alert(this.resp);//display 'foo.css has been loaded\n          },null,{resp: 'foo.css has been loaded!'});\n\n\nSupported Browsers\n------------------\n\n* Firefox 2+\n* Google Chrome (all versions)\n* Internet Explorer 6+\n* Opera 9+\n* Safari 3+\n* Mobile Safari (all versions)","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthinkphp%2Flazyload","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fthinkphp%2Flazyload","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthinkphp%2Flazyload/lists"}