{"id":20068283,"url":"https://github.com/darrentaytay/jquery-character-counter","last_synced_at":"2025-07-11T17:46:34.856Z","repository":{"id":6944115,"uuid":"8195821","full_name":"darrentaytay/jquery-character-counter","owner":"darrentaytay","description":"A simple, Twitter style character counter for HTML input fields.","archived":false,"fork":false,"pushed_at":"2017-08-31T15:04:40.000Z","size":27,"stargazers_count":51,"open_issues_count":5,"forks_count":31,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-04-09T03:04:40.589Z","etag":null,"topics":["character-counter","javascript"],"latest_commit_sha":null,"homepage":null,"language":"HTML","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/darrentaytay.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":"2013-02-14T08:09:21.000Z","updated_at":"2021-11-30T13:47:12.000Z","dependencies_parsed_at":"2022-07-29T01:08:02.754Z","dependency_job_id":null,"html_url":"https://github.com/darrentaytay/jquery-character-counter","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/darrentaytay%2Fjquery-character-counter","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/darrentaytay%2Fjquery-character-counter/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/darrentaytay%2Fjquery-character-counter/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/darrentaytay%2Fjquery-character-counter/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/darrentaytay","download_url":"https://codeload.github.com/darrentaytay/jquery-character-counter/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252562765,"owners_count":21768346,"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":["character-counter","javascript"],"created_at":"2024-11-13T14:06:00.018Z","updated_at":"2025-05-05T19:31:03.386Z","avatar_url":"https://github.com/darrentaytay.png","language":"HTML","funding_links":[],"categories":[],"sub_categories":[],"readme":"# jquery-character-counter\n\nA simple, Twitter style character counter for HTML input fields. Based on your specified limit, the plugin simply adds a span ( by default ) after your HTML input and updates it as you type.\n\n__Features:__\n* Ctrl \u0026 V paste support\n* Right click \u0026 paste support\n* Customizable wrapper and css classes\n* Customizable counter format\n* Callbacks for exceeding and deceeding the specified limit\n\n## Getting Started\n\nTo get started with the character counter, simply reference jQuery and the jQuery Character Counter plugin in your page.\n\n```html\n\u003cscript src=\"//ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js\"\u003e\u003c/script\u003e\t\n\u003cscript type=\"text/javascript\" src=\"jquery.charactercounter.js\"\u003e\u003c/script\u003e\n```\n\n### Examples\n\n#### Default Usage\n\n__HTML:__\n```html\n\u003cform\u003e\n  \u003ctextarea id=\"count_me\"\u003e\u003c/textarea\u003e\n\u003c/form\u003e\n```\n__Javascript:__\n```javascript\n$(\"#count_me\").characterCounter();\n```\n\n#### Custom Limit\n\n__HTML:__\n```html\n\u003cform\u003e\n  \u003ctextarea id=\"count_me\"\u003e\u003c/textarea\u003e\n\u003c/form\u003e\n```\n__Javascript:__\n```javascript\n$(\"#count_me\").characterCounter({\n  limit: '250'  \n});\n```\n***\n\n### Options\n\nThe following options are currently available:\n\n```javascript\n{\nlimit: 150,\ncounterWrapper: 'span',\ncounterCssClass: 'counter',\ncounterFormat: '%1',\ncounterExceededCssClass: 'exceeded',\nonExceed: function(count){},\nonDeceed: function(count){},\ncustomFields: {}\n}\n```\n\n__limit__ - the number of characters you wish to limit.  \n__counterWrapper__ - the element you wish to wrap your counter in.  \n__counterCssClass__ - the CSS class to apply to your counter.  \n__counterFormat__ - the format of your counter text where '%1' will be replaced with the remaining character count.  \n__newLineSymbolCount__ - count new lines  \n__counterExceededCssClass__ - the CSS class to apply when your limit has been exceeded.  \n__onExceed__ - this function is called when the limit is breached   \n__onDeceed__ - this function is called when the limit, having previously been exceeded, is now deceeded\n__customFields__ - key value pairs of custom options to be added to the counter such as class, data attributes etc.\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdarrentaytay%2Fjquery-character-counter","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdarrentaytay%2Fjquery-character-counter","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdarrentaytay%2Fjquery-character-counter/lists"}