{"id":17976051,"url":"https://github.com/stefangabos/zebra_clearinput","last_synced_at":"2025-10-15T14:10:06.861Z","repository":{"id":195096812,"uuid":"692435839","full_name":"stefangabos/Zebra_ClearInput","owner":"stefangabos","description":"A tiny jQuery plugin for enhancing web forms by allowing users to easily clear values in text input boxes","archived":false,"fork":false,"pushed_at":"2025-10-05T09:26:02.000Z","size":956,"stargazers_count":5,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-10-10T15:42:29.750Z","etag":null,"topics":["forms","input","javascript","jquery","jquery-plugin","text-input","usability","user-experience"],"latest_commit_sha":null,"homepage":"https://stefangabos.github.io/Zebra_ClearInput/","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"lgpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/stefangabos.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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2023-09-16T13:23:09.000Z","updated_at":"2025-10-07T09:10:58.000Z","dependencies_parsed_at":"2023-09-16T14:10:37.171Z","dependency_job_id":"cb3133bf-0510-451e-9c16-ca9df9f9cff0","html_url":"https://github.com/stefangabos/Zebra_ClearInput","commit_stats":{"total_commits":90,"total_committers":1,"mean_commits":90.0,"dds":0.0,"last_synced_commit":"8731f7afa55f20da5fc367f4f0ddf1d976b1c174"},"previous_names":["stefangabos/zebra_clearinput"],"tags_count":5,"template":false,"template_full_name":null,"purl":"pkg:github/stefangabos/Zebra_ClearInput","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stefangabos%2FZebra_ClearInput","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stefangabos%2FZebra_ClearInput/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stefangabos%2FZebra_ClearInput/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stefangabos%2FZebra_ClearInput/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/stefangabos","download_url":"https://codeload.github.com/stefangabos/Zebra_ClearInput/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stefangabos%2FZebra_ClearInput/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279085160,"owners_count":26100015,"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-10-15T02:00:07.814Z","response_time":56,"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":["forms","input","javascript","jquery","jquery-plugin","text-input","usability","user-experience"],"created_at":"2024-10-29T17:21:44.576Z","updated_at":"2025-10-15T14:10:06.818Z","avatar_url":"https://github.com/stefangabos.png","language":"JavaScript","funding_links":["https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick\u0026hosted_button_id=LLXP492Y7VYZJ","https://github.com/sponsors/stefangabos"],"categories":[],"sub_categories":[],"readme":"\u003cimg src=\"https://raw.githubusercontent.com/stefangabos/zebrajs/master/docs/images/logo.png\" alt=\"zebrajs\" align=\"right\"\u003e\n\n# Zebra ClearInput \u0026nbsp;[![Tweet](https://img.shields.io/twitter/url/http/shields.io.svg?style=social)](https://twitter.com/intent/tweet?text=A+tiny+jQuery+plugin+for+enhancing+web+forms+by+allowing+users+to+easily+clear+values+in+text+input+boxes\u0026url=https://github.com/stefangabos/Zebra_ClearInput\u0026via=stefangabos\u0026hashtags=jquery,javascript)\n\n*A tiny jQuery plugin for enhancing web forms by allowing users to easily clear values in text input boxes*\n\n[![npm](https://img.shields.io/npm/v/zebra_clearinput.svg)](https://www.npmjs.com/package/zebra_clearinput) [![Total](https://img.shields.io/npm/dt/zebra_clearinput.svg)](https://www.npmjs.com/package/zebra_clearinput) [![Monthly](https://img.shields.io/npm/dm/zebra_clearinput.svg)](https://www.npmjs.com/package/zebra_clearinput) [![](https://data.jsdelivr.com/v1/package/npm/zebra_clearinput/badge?style=rounded)](https://www.jsdelivr.com/package/npm/zebra_clearinput)  [![License](https://img.shields.io/npm/l/zebra_clearinput.svg)](https://github.com/stefangabos/Zebra_ClearInput/blob/master/LICENSE.md)\n\nZebra ClearInput is a lightweight jQuery plugin designed to enhance the usability of web forms by adding a user-friendly feature that allows users to effortlessly clear the content of input fields. This is achieved by attaching a small icon to input fields. When users click on this icon, it promptly erases any text that has been entered.\n\nAs soon as a user begins typing in the input field, the option to clear the input value becomes visible. Once the input field loses focus, the option to clear the value reappears when the mouse hovers over the input field.\n\n## Features\n\n - it works out of the box and has (almost) no configuration options\n - it is really tiny - it weighs 1.4KB uncompressed and ~600 bytes gzipped\n - works in any modern browser - Firefox, Chrome, Safari, Edge, Opera\n\n## 🎂 Support the development of this project\n\nYour support means a lot and it keeps me motivated to keep working on open source projects.\u003cbr\u003e\nIf you like this project please ⭐ it by clicking on the star button at the top of the page.\u003cbr\u003e\nIf you are feeling generous, you can buy me a coffee by donating through PayPal, or you can become a sponsor.\u003cbr\u003e\nEither way - **Thank you!** 🎉\n\n[\u003cimg src=\"https://img.shields.io/github/stars/stefangabos/zebra_clearinput?color=green\u0026label=star%20it%20on%20GitHub\" width=\"132\" height=\"20\" alt=\"Star it on GitHub\"\u003e](https://github.com/stefangabos/Zebra_ClearInput) [![Donate](https://img.shields.io/badge/Donate-PayPal-green.svg)](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick\u0026hosted_button_id=LLXP492Y7VYZJ) [\u003cimg src=\"https://img.shields.io/badge/-Sponsor-fafbfc?logo=GitHub%20Sponsors\"\u003e](https://github.com/sponsors/stefangabos)\n\n## Demo\n\nSee the [demos](https://stefangabos.github.io/Zebra_ClearInput/)\n\n## Requirements\n\nZebra ClearInput has no dependencies other than jQuery 1.7.0+\n\n## Installation\n\nZebra ClearInput is available as a [npm package](https://www.npmjs.com/package/zebra_clearinput). To install it use:\n\n```bash\n# the \"--save\" argument adds the plugin as a dependency in packages.json\nnpm install zebra_clearinput --save\n```\n\n## How to use\n\nFirst, load jQuery from a CDN and provide a fallback to a local source like:\n\n```html\n\u003cscript src=\"https://code.jquery.com/jquery-3.5.0.min.js\"\u003e\u003c/script\u003e\n\u003cscript\u003ewindow.jQuery || document.write('\u003cscript src=\"path/to/jquery-3.5.0.js\"\u003e\u003c\\/script\u003e')\u003c/script\u003e\n```\n\nLoad the Zebra ClearInput jQuery plugin:\n\n```html\n\u003cscript src=\"path/to/zebra_clearinput.min.js\"\u003e\u003c/script\u003e\n```\n\nAlternatively, you can load Zebra ClerInput from [JSDelivr CDN](https://www.jsdelivr.com/package/npm/zebra_clearinput) like this:\n\n```html\n\u003c!-- for the most recent version, not recommended in production --\u003e\n\u003cscript\n  src=\"https://cdn.jsdelivr.net/npm/zebra_clearinput@latest/dist/zebra_clearinput.min.js\"\u003e\u003c/script\u003e\n\n\u003c!-- for a specific version --\u003e\n\u003cscript\n  src=\"https://cdn.jsdelivr.net/npm/zebra_clearinput@1.0.0/dist/zebra_clearinput.min.js\"\u003e\u003c/script\u003e\n\n\u003c!-- replacing \"min\" with \"src\" will serve you the non-compressed version --\u003e\n```\n\nLoad the style sheet file from a local source\n\n```html\n\u003clink rel=\"stylesheet\" href=\"path/to/zebra_clearinput.min.css\"\u003e\n```\n\n...or from [JSDelivr CDN](https://www.jsdelivr.com/package/npm/zebra_clearinput)\n\n```html\n\u003c!-- for the most recent version --\u003e\n\u003clink\n  rel=\"stylesheet\"\n  href=\"https://cdn.jsdelivr.net/npm/zebra_clearinput@latest/dist/zebra_clearinput.min.css\"\u003e\n\n\u003c!-- for a specific version --\u003e\n\u003clink\n  rel=\"stylesheet\"\n  href=\"https://cdn.jsdelivr.net/npm/zebra_clearinput@1.0.0/dist/zebra_clearinput.min.css\"\u003e\n\n\u003c!-- replacing \"min\" with \"src\" will serve you the non-compressed version --\u003e\n```\n\nNow, within the DOM-ready event do\n\n```javascript\n$(document).ready(function() {\n\n    // apply to all text input elements\n    new $.Zebra_ClearInput('input[type=text]');\n\n    // apply to certain text input elements\n    new $.Zebra_ClearInput('input.myClass');\n\n    // apply to all text input elements and\n    // add the default CSS class name for the buttons and a custom one\n    new $.Zebra_ClearInput('input[type=\"text\"]', {\n        button_class_name: 'Zebra_ClearInput myCustomStyles'\n    });\n\n});\n```\n\n## Configuration options\n\n## Properties\n\n\u003ctable width=\"100%\"\u003e\n    \u003cthead\u003e\n    \u003ctr\u003e\n        \u003cth\u003eProperty\u003c/th\u003e\n        \u003cth\u003eType\u003c/th\u003e\n        \u003cth\u003eDefault\u003c/th\u003e\n        \u003cth\u003eDescription\u003c/th\u003e\n    \u003c/tr\u003e\n    \u003c/thead\u003e\n    \u003ctbody\u003e\n    \u003ctr\u003e\n        \u003ctd valign=\"top\"\u003e\u003ccode\u003econtainer_class_name\u003c/code\u003e\u003c/td\u003e\n        \u003ctd valign=\"top\"\u003e\u003cem\u003estring\u003c/em\u003e\u003c/td\u003e\n        \u003ctd valign=\"top\"\u003e\u003ccode\u003eZebra_ClearInput_Container\u003c/code\u003e\u003c/td\u003e\n        \u003ctd valign=\"top\"\u003eThe CSS class(es) to be applied to the container DIV that will wrap the target text input element\u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\n        \u003ctd valign=\"top\"\u003e\u003ccode\u003ebutton_class_name\u003c/code\u003e\u003c/td\u003e\n        \u003ctd valign=\"top\"\u003e\u003cem\u003estring\u003c/em\u003e\u003c/td\u003e\n        \u003ctd valign=\"top\"\u003e\u003ccode\u003eZebra_ClearInput\u003c/code\u003e\u003c/td\u003e\n        \u003ctd valign=\"top\"\u003eThe CSS class(es) to be applied to the button associated with the text input element\u003c/td\u003e\n    \u003c/tr\u003e\n    \u003c/tbody\u003e\n\u003c/table\u003e\n\n## Methods\n\n### `destroy()`\n\nRemoves a previously created instance of the plugin.\n\n```javascript\n// apply to all text input elements\nvar clearInput = new $.Zebra_ClearInput('input[type=\"text\"]');\n\n// remove plugin\nclearInput.destroy();\n```\n\n## Sponsors\n\nCross browser/device testing is done with\n\n[![BrowserStack](https://github.com/stefangabos/Zebra_Dialog/raw/master/examples/browserstack.png)](https://www.browserstack.com/)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstefangabos%2Fzebra_clearinput","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fstefangabos%2Fzebra_clearinput","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstefangabos%2Fzebra_clearinput/lists"}