{"id":18067621,"url":"https://github.com/alanclarke/positions","last_synced_at":"2025-04-11T21:20:49.462Z","repository":{"id":6916400,"uuid":"53681571","full_name":"alanclarke/positions","owner":"alanclarke","description":"A small dom element positioning lib inspired by jquery-ui/position","archived":false,"fork":false,"pushed_at":"2023-04-17T03:31:45.000Z","size":2676,"stargazers_count":31,"open_issues_count":14,"forks_count":4,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-03-28T11:37:36.557Z","etag":null,"topics":["ceh","cmh","implement"],"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/alanclarke.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}},"created_at":"2016-03-11T16:42:06.000Z","updated_at":"2023-07-26T14:26:15.000Z","dependencies_parsed_at":"2023-07-27T16:17:46.068Z","dependency_job_id":null,"html_url":"https://github.com/alanclarke/positions","commit_stats":null,"previous_names":["qubitproducts/positions"],"tags_count":10,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alanclarke%2Fpositions","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alanclarke%2Fpositions/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alanclarke%2Fpositions/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alanclarke%2Fpositions/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/alanclarke","download_url":"https://codeload.github.com/alanclarke/positions/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248480421,"owners_count":21110939,"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":["ceh","cmh","implement"],"created_at":"2024-10-31T07:09:55.946Z","updated_at":"2025-04-11T21:20:49.414Z","avatar_url":"https://github.com/alanclarke.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"## \u003cimg width=\"350\" alt=\"positions\" src=\"https://cloud.githubusercontent.com/assets/640611/13756080/1928a892-ea16-11e5-9c36-51dafb47fad4.png\"\u003e\n\nA small dom element positioning lib inspired by jquery-ui/position\n\n## installation\n```js\nnpm install positions\n```\n\n## features\n- no dependencies\n- simple functional api\n- well tested in ie9+\n- tiny (871 B)\n\n## usage\n```js\nvar positions = require('positions')\n```\n\n```js\n// positions els 'top left' at targets 'top left'\nvar css = positions(el, 'top left', target, 'top left')\n```\n\n\u003cimg width=\"40\" alt=\"top-left-top-left\" src=\"https://cloud.githubusercontent.com/assets/640611/13719721/07895ab2-e7f2-11e5-8bee-6e8c74abcc7e.png\"\u003e\n\n```js\n// positions els 'center center' at targets 'center center'\nvar css = positions(el, 'center center', target, 'center center')\n```\n\n\u003cimg width=\"40\" alt=\"center-center-center-center\" src=\"https://cloud.githubusercontent.com/assets/640611/13719719/0788243a-e7f2-11e5-943c-fcc580dbcd3f.png\"\u003e\n\n```js\n// positions els bottom left at targets top left\nvar css = positions(el, 'bottom left', target, 'top left')\n```\n\n\u003cimg width=\"40\" alt=\"bottom-left-top-left\" src=\"https://cloud.githubusercontent.com/assets/640611/13742253/c7cee7d8-e9d2-11e5-8cab-aa8b22c7eecc.png\"\u003e\n\n```js\n// positions els bottom center at targets bottom center\nvar css = positions(el, 'bottom center', target, 'bottom center')\n```\n\n\u003cimg width=\"40\" alt=\"bottom-center-bottom-center\" src=\"https://cloud.githubusercontent.com/assets/640611/13719722/0789dc9e-e7f2-11e5-9353-6cba4cd5c7ab.png\"\u003e\n\n\n...etc.\n\n\n## run tests\n```js\nnpm test\n```\n\n## browser compatibility\nworks in all good browsers! (also in ie9+)\n\n\n## Want to work on this for your day job?\n\nThis project was created by the Engineering team at Qubit. As we use open source libraries, we make our projects public where possible.\n\nWe’re currently looking to grow our team, so if you’re a JavaScript engineer and keen on ES2016 React+Redux applications and Node micro services, why not get in touch? Work with like minded engineers in an environment that has fantastic perks, including an annual ski trip, yoga, a competitive foosball league, and copious amounts of yogurt.\n\nFind more details on our Engineering site. Don’t have an up to date CV? Just link us your Github profile! Better yet, send us a pull request that improves this project.`\nContact GitHub API Training Shop Blog About\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falanclarke%2Fpositions","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Falanclarke%2Fpositions","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falanclarke%2Fpositions/lists"}