{"id":16760310,"url":"https://github.com/ryanve/associated","last_synced_at":"2025-08-13T19:34:28.450Z","repository":{"id":57185253,"uuid":"73780699","full_name":"ryanve/associated","owner":"ryanve","description":"Get associated labels and inputs","archived":false,"fork":false,"pushed_at":"2017-02-16T06:27:37.000Z","size":33,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"gh-pages","last_synced_at":"2025-07-21T23:55:14.380Z","etag":null,"topics":["expressive","forms","inputs","javascript","jquery-plugin","labels"],"latest_commit_sha":null,"homepage":"https://ryanve.github.io/associated/","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ryanve.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2016-11-15T05:49:40.000Z","updated_at":"2023-08-08T21:06:59.000Z","dependencies_parsed_at":"2022-09-14T10:02:30.854Z","dependency_job_id":null,"html_url":"https://github.com/ryanve/associated","commit_stats":null,"previous_names":[],"tags_count":12,"template":false,"template_full_name":null,"purl":"pkg:github/ryanve/associated","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ryanve%2Fassociated","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ryanve%2Fassociated/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ryanve%2Fassociated/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ryanve%2Fassociated/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ryanve","download_url":"https://codeload.github.com/ryanve/associated/tar.gz/refs/heads/gh-pages","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ryanve%2Fassociated/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":266904600,"owners_count":24004132,"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","status":"online","status_checked_at":"2025-07-24T02:00:09.469Z","response_time":99,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["expressive","forms","inputs","javascript","jquery-plugin","labels"],"created_at":"2024-10-13T04:23:05.838Z","updated_at":"2025-08-13T19:34:28.202Z","avatar_url":"https://github.com/ryanve.png","language":"JavaScript","readme":"# associated\n\n```\nnpm install associated --save\n```\n\n## Features\n- Get label(s) for a specified input\n- Get form control (input, textarea, select, button) for a specified label\n- Get associated form\n- Get associated radios\n\n## API\n\n```js\nvar associated = require('associated')\n```\n\n### Parameters\n\n- `$form` refers to a jQuery-wrapped `\u003cform\u003e` element\n- `$root` refers to a jQuery-wrapped `:root` element\n- `$input` refers to a jQuery-wrapped `\u003cinput\u003e` element\n- `$textarea` refers to a jQuery-wrapped `\u003ctextarea\u003e` element\n- `$select` refers to a jQuery-wrapped `\u003cselect\u003e` element\n- `$button` refers to a jQuery-wrapped `\u003cbutton\u003e` element\n- `$control` refers to a jQuery-wrapped form control: `$input`, `$textarea`, `$select`, or `$button`\n- `$label` refers to a jQuery-wrapped `\u003clabel\u003e` element\n- `$labels` refers to a jQuery-wrapped `\u003clabel\u003e` collection\n- `$radio` refers to a jQuery-wrapped radio input\n- `$radios` refers to a jQuery-wrapped radio input collection\n\n### Methods\n\n#### `associated.control($label)`\n- Get `$control` associated with `$label`\n\n#### `associated.input($label)`\n- Get `$input` associated with `$label`\n\n#### `associated.textarea($label)`\n- Get `$textarea` associated with `$label`\n\n#### `associated.select($label)`\n- Get `$select` associated with `$label`\n\n#### `associated.button($label)`\n- Get `$button` associated with `$label`\n\n#### `associated.label($control)`\n- Get the `$label` associated with `$control`\n\n#### `associated.labels($control)`\n- Get all `$labels` associated with `$control`\n\n#### `associated.form($control)`\n- Get associated `$form` or else `$root`\n\n#### `associated.radios($radio)`\n- Get `$radios` associated by `[name]`\n\n### Chaining\n\n#### Setup `associated` for use as plugin for jQuery or ender\n```js\n$.prototype.associated = associated\n```\n\n#### Then use `.associated` to call [methods](#methods) from the chain like\n```js\n$('#example').associated('form')\n```\n\n## Links\n- [`associated` npm](https://www.npmjs.com/package/associated)\n- [`associated` tests](https://ryanve.github.io/associated/)\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fryanve%2Fassociated","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fryanve%2Fassociated","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fryanve%2Fassociated/lists"}