{"id":16186903,"url":"https://github.com/robloach/jquery-once","last_synced_at":"2025-04-06T10:11:52.460Z","repository":{"id":7220939,"uuid":"8528208","full_name":"RobLoach/jquery-once","owner":"RobLoach","description":":heavy_dollar_sign: Act on jQuery elements only once.","archived":false,"fork":false,"pushed_at":"2024-01-04T22:16:13.000Z","size":256,"stargazers_count":61,"open_issues_count":0,"forks_count":20,"subscribers_count":7,"default_branch":"master","last_synced_at":"2025-03-30T18:02:01.661Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"http://npm.im/jquery-once","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/RobLoach.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE.md","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":"2013-03-02T22:41:09.000Z","updated_at":"2023-11-23T09:28:49.000Z","dependencies_parsed_at":"2024-06-18T15:23:32.299Z","dependency_job_id":"e0c5c5ea-0470-49f1-8cbe-434ac6058285","html_url":"https://github.com/RobLoach/jquery-once","commit_stats":null,"previous_names":[],"tags_count":28,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RobLoach%2Fjquery-once","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RobLoach%2Fjquery-once/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RobLoach%2Fjquery-once/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RobLoach%2Fjquery-once/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/RobLoach","download_url":"https://codeload.github.com/RobLoach/jquery-once/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247464222,"owners_count":20942970,"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-10-10T07:19:48.469Z","updated_at":"2025-04-06T10:11:52.441Z","avatar_url":"https://github.com/RobLoach.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# jQuery Once [![NPM version](https://img.shields.io/npm/v/jquery-once.svg)](https://npmjs.org/package/jquery-once \"View this project on NPM\")\n\n![Testing](https://github.com/RobLoach/jquery-once/workflows/tests/badge.svg)\n[![NPM downloads](https://img.shields.io/npm/dm/jquery-once.svg)](https://npmjs.org/package/jquery-once \"View this project on NPM\")\n\n\u003e Act on [jQuery](http://jquery.com) elements only once.\n\nFilters out all elements that had the same filter applied on them before. It\ncan be used to ensure that a function is only applied once to an element.\n\n## Install\n\nMethod | Installation\n------ | ------------\n[npm](http://npmjs.com/package/jquery-once) | `npm install jquery-once --save`\n[Composer](https://packagist.org/packages/robloach/jquery-once) | `composer require robloach/jquery-once`\n[Bower](http://bower.io/search/?q=jquery-once) | `bower install jquery-once`\n[Component](https://github.com/componentjs/component) | `component install RobLoach/jquery-once`\n[jsDelivr](http://www.jsdelivr.com/#!jquery.once) | `//cdn.jsdelivr.net/npm/jquery-once@2.3.0/jquery.once.min.js`\n[cdnjs](https://cdnjs.com/libraries/jquery-once) | `//cdnjs.cloudflare.com/ajax/libs/jquery-once/2.3.0/jquery.once.js`\n\n## Usage\n\n[See the API documentation for more information on how to use jQuery Once.](https://github.com/RobLoach/jquery-once/blob/master/API.md#readme)\n\n``` javascript\n// The following will change the color of each paragraph to red, just once\n// for the \"changecolor\" key.\n$('p').once('changecolor').css('color', 'red');\n\n// .once() will return a set of elements that yet to have the once ID\n// associated with them. You can return to the original collection set by\n// using .end().\n$('p')\n  .once(\"changecolorblue\")\n    .css(\"color\", \"blue\")\n  .end()\n  .css(\"color\", \"red\");\n\n// To execute a function on the once set, you can use jQuery's each().\n$('div.calendar').once().each(function() {\n  // Since there is no once ID provided here, the key will be \"once\".\n});\n```\n\n## Development\n\n1. Ensure you are using [node](http://nodejs.org) \u003e= 4:\n  ```\n  node --version\n  ```\n\n2. Install dependencies through [npm](http://npmjs.org):\n  ```\n  npm install\n  ```\n\n3. Check coding style standard, and automated testing:\n  ```\n  npm test\n  ```\n\n4. Build `jquery.once.min.js` with:\n  ```\n  npm run build\n  ```\n\n5. Update API documentation:\n  ```\n  npm run docs\n  ```\n\n6. Tag and publish the new versions to [npm](http://npmjs.com) with [Semantic\nVersioning](http://semver.org/):\n  ```\n  git add -A\n  git commit -m \"2.3.0\"\n  git tag 2.3.0\n  git push origin 2.3.0\n  npm publish\n  ```\n\n## Change Log\n\n[Discover the change history by heading on over to the `CHANGELOG.md` file.](CHANGELOG.md)\n\n## License\n\nDual licensed under:\n\n- [GPL-2.0](http://opensource.org/licenses/gpl-2.0.php)\n- the incredibly [permissive](http://en.wikipedia.org/wiki/Permissive_free_software_licence) [MIT license](http://opensource.org/licenses/MIT)\n\nCopyright \u0026copy; [Rob Loach](http://github.com/RobLoach)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frobloach%2Fjquery-once","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frobloach%2Fjquery-once","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frobloach%2Fjquery-once/lists"}