Security News
tea.xyz Spam Plagues npm and RubyGems Package Registries
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
zebra_clearinput
Advanced tools
Readme
A tiny jQuery plugin for enhancing web forms by allowing users to easily clear values in text input boxes
Zebra 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.
As 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.
Your support means a lot and it keeps me motivated to keep working on open source projects.
If you like this project please ⭐ it by clicking on the star button at the top of the page.
If you are feeling generous, you can buy me a coffee by donating through PayPal, or you can become a sponsor.
Either way - Thank you! 🎉
See the demos
Zebra ClearInput has no dependencies other than jQuery 1.7.0+
Zebra ClearInput is available as a npm package. To install it use:
# the "--save" argument adds the plugin as a dependency in packages.json
npm install zebra_clearinput --save
First, load jQuery from a CDN and provide a fallback to a local source like:
<script src="https://code.jquery.com/jquery-3.5.0.min.js"></script>
<script>window.jQuery || document.write('<script src="path/to/jquery-3.5.0.js"><\/script>')</script>
Load the Zebra ClearInput jQuery plugin:
<script src="path/to/zebra_clearinput.min.js"></script>
Alternatively, you can load Zebra ClerInput from JSDelivr CDN like this:
<!-- for the most recent version, not recommended in production -->
<script
src="https://cdn.jsdelivr.net/npm/zebra_clearinput@latest/dist/zebra_clearinput.min.js"></script>
<!-- for a specific version -->
<script
src="https://cdn.jsdelivr.net/npm/zebra_clearinput@1.0.0/dist/zebra_clearinput.min.js"></script>
<!-- replacing "min" with "src" will serve you the non-compressed version -->
Load the style sheet file from a local source
<link rel="stylesheet" href="path/to/zebra_clearinput.min.css">
...or from JSDelivr CDN
<!-- for the most recent version -->
<link
rel="stylesheet"
href="https://cdn.jsdelivr.net/npm/zebra_clearinput@latest/dist/zebra_clearinput.min.css">
<!-- for a specific version -->
<link
rel="stylesheet"
href="https://cdn.jsdelivr.net/npm/zebra_clearinput@1.0.0/dist/zebra_clearinput.min.css">
<!-- replacing "min" with "src" will serve you the non-compressed version -->
Now, within the DOM-ready event do
$(document).ready(function() {
// apply to all text input elements
new $.Zebra_ClearInput('input[type=text]');
// apply to certain text input elements
new $.Zebra_ClearInput('input.myClass');
// apply to all text input elements and
// add the default CSS class name for the buttons and a custom one
new $.Zebra_ClearInput('input[type="text"]', {
button_class_name: 'Zebra_ClearInput myCustomStyles'
});
});
Property | Type | Default | Description |
---|---|---|---|
container_class_name | string | Zebra_ClearInput_Container | The CSS class(es) to be applied to the container DIV that will wrap the target text input element |
button_class_name | string | Zebra_ClearInput | The CSS class(es) to be applied to the button associated with the text input element |
destroy()
Removes a previously created instance of the plugin.
// apply to all text input elements
var clearInput = new $.Zebra_ClearInput('input[type="text"]');
// remove plugin
clearInput.destroy();
Cross browser/device testing is done with
FAQs
A tiny jQuery plugin for enhancing web forms by allowing users to easily clear values in text input boxes
The npm package zebra_clearinput receives a total of 0 weekly downloads. As such, zebra_clearinput popularity was classified as not popular.
We found that zebra_clearinput demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
Security News
As cyber threats become more autonomous, AI-powered defenses are crucial for businesses to stay ahead of attackers who can exploit software vulnerabilities at scale.
Security News
UnitedHealth Group disclosed that the ransomware attack on Change Healthcare compromised protected health information for millions in the U.S., with estimated costs to the company expected to reach $1 billion.