{"id":21144354,"url":"https://github.com/gilbert/query-loader","last_synced_at":"2025-08-20T10:24:55.969Z","repository":{"id":136581382,"uuid":"1376893","full_name":"gilbert/query-loader","owner":"gilbert","description":"Easy-to-use loading bar that loads static assets before displaying the page.","archived":false,"fork":false,"pushed_at":"2011-03-04T00:07:19.000Z","size":162,"stargazers_count":10,"open_issues_count":0,"forks_count":2,"subscribers_count":1,"default_branch":"master","last_synced_at":"2023-03-10T21:27:58.036Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"JavaScript","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/gilbert.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":"2011-02-17T03:52:36.000Z","updated_at":"2023-03-10T21:31:29.645Z","dependencies_parsed_at":"2023-03-14T08:30:52.352Z","dependency_job_id":null,"html_url":"https://github.com/gilbert/query-loader","commit_stats":null,"previous_names":[],"tags_count":null,"template":null,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gilbert%2Fquery-loader","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gilbert%2Fquery-loader/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gilbert%2Fquery-loader/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gilbert%2Fquery-loader/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/gilbert","download_url":"https://codeload.github.com/gilbert/query-loader/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":225489434,"owners_count":17482378,"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-20T08:17:07.282Z","updated_at":"2024-11-20T08:17:07.938Z","avatar_url":"https://github.com/gilbert.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"Query Loader\n============\n\n### What?\n\nQuery Loader is a jQuery plugin that lets you pre-load static assets with a nice loading UI, all in a few lines of javascript.\n\n## Quick Start\n\nAdd the necessary files:\n\n    \u003clink rel=\"stylesheet\" href=\"queryLoader.css\" type=\"text/css\" /\u003e\n    \n    \u003cscript type='text/javascript' src='jquery.min.js'\u003e\u003c/script\u003e\n    \u003cscript type='text/javascript' src='queryLoader.js'\u003e\u003c/script\u003e\n\nNow place this at the bottom of your page:\n\n    \u003cscript type='text/javascript'\u003e\n    \tQueryLoader.init();\n    \u003c/script\u003e\n\nThat's it!\n\n## Demo\n\n[Click here](http://jsfiddle.net/mindeavor/G4Ayu/embedded/result/) for a live demo.\n[Fiddle with the live demo source](http://jsfiddle.net/mindeavor/G4Ayu/)\n\n## Documentation\n\n### QueryLoader.init()\n\n    QueryLoader.init([options])\n\nBy default, searches for all `img` tags and `background-image`s in the selected element and pre-loads them behind an animated loading bar.\n\nOptions:\n\n- `elem` (defaults to `'body'`): A jQuery selector that determines which element to preload.\n\n        QueryLoader.init({\n          elem: '#image-gallery'\n        });\n\n- `images` An additional array of image source urls to preload during the preloading process.\n\n- `imagePrefix` A handy helper that prefixes all the given image sources with the given string.\n\n        QueryLoader.init({\n          imagePrefix: '/images/',\n          images: ['popup-button.png','larger-image.png']\n        });\n\n\n- `scripts` A script dependency pipeline represented as a multi-level array. See **Dependency Pipeline** for details.\n\n- `scriptPrefix` A handy helper that prefixes all the given scripts with the given string.\n\n        QueryLoader.init({\n          scriptPrefix: '/javascripts/',\n          scripts: ['support/underscore.js',\n                    ['support/backbone.js',\n                     ['myApp.js','myHelpers.js','myUtils.js']]],\n        });\n\n- `onLoad` A callback function that triggers once all assets have been loaded, but before the page is shown.\n\n- `onComplete` A callback function that triggers after the loading animation has fully completed.\n\n        QueryLoader.init({\n          onLoad: function () {\n            alert('Loading complete. Now fading into your web page...');\n          },\n          onComplete: function () {\n            alert('Loading animation complete!');\n          }\n        });\n\n## Dependency Pipeline\n\nThe `scripts` option provides a way to load multiple scripts asynchronously, while still maintaining dependencies. Every level of the array is considered a dependency for the next deeper level.\n\nFor example, if A and B both depend on X:\n\n    QueryLoader.init({\n      scripts: ['X.js',\n                ['A.js', 'B.js']]\n    });\n\nIn this example, X is loaded first. Once X is loaded, both A and B are loaded asynchronously.\n\nCredits\n=======\n\nMajor credit goes to [Gaya Design](http://www.gayadesign.com/)'s [QueryLoader jQuery plugin](http://www.gayadesign.com/diy/queryloader-preload-your-website-in-style/) for the original idea and implementation.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgilbert%2Fquery-loader","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgilbert%2Fquery-loader","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgilbert%2Fquery-loader/lists"}