{"id":19143658,"url":"https://github.com/cobyism/jquery-caret","last_synced_at":"2025-05-07T01:02:59.914Z","repository":{"id":6283160,"uuid":"7517267","full_name":"cobyism/jquery-caret","owner":"cobyism","description":"Set and query caret position within textareas and text inputs.","archived":false,"fork":false,"pushed_at":"2013-07-01T15:52:28.000Z","size":146,"stargazers_count":6,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"gh-pages","last_synced_at":"2025-04-19T16:39:52.048Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"http://cobyism.com/jquery-caret","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/cobyism.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":"2013-01-09T08:14:38.000Z","updated_at":"2019-08-27T17:47:45.000Z","dependencies_parsed_at":"2022-09-07T21:20:49.508Z","dependency_job_id":null,"html_url":"https://github.com/cobyism/jquery-caret","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/cobyism%2Fjquery-caret","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cobyism%2Fjquery-caret/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cobyism%2Fjquery-caret/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cobyism%2Fjquery-caret/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/cobyism","download_url":"https://codeload.github.com/cobyism/jquery-caret/tar.gz/refs/heads/gh-pages","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252793661,"owners_count":21805057,"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-09T07:32:26.275Z","updated_at":"2025-05-07T01:02:59.777Z","avatar_url":"https://github.com/cobyism.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"Caret\n=====\n\nA small jQuery plugin to set and query caret (keyboard input cursor) position within `\u003ctextarea\u003e`s and text `\u003cinput\u003e`s.\n\n## Usage\n\nInclude scripts for jQuery and this plugin in your HTML (refer to [the demo](http://cobyism.com/jquery-caret) for an example):\n\n```html\n\u003cscript type=\"text/javascript\" src=\"jquery-1.8.3.min.js\"\u003e\u003c/script\u003e\n\u003cscript type=\"text/javascript\" src=\"jquery.caret.js\"\u003e\u003c/script\u003e\n```\n\nThen use the `caret()` method to set or query the caret position for your `\u003ctextarea\u003e`.\n\n```js\n$('.your-textarea').caret(5)\n//=\u003e Caret is placed after the 5 character in the text field\n$('.your-textarea').caret()\n//=\u003e 5\n```\n\nNote: that the caret position index starts at `0`, not `1`.\n\n## Browser support\n\nThis should function correctly in most modern browsers:\n- Recent versions of Chrome, Safari, Firefox, Opera.\n- Internet Explorer 9 (earlier versions untested).\n\n## Contributions\n\nContributions welcome! :grinning:\n\n## License\n\nSee [LICENSE](https://github.com/cobyism/jquery-caret/blob/gh-pages/LICENSE).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcobyism%2Fjquery-caret","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcobyism%2Fjquery-caret","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcobyism%2Fjquery-caret/lists"}