Latest Threat Research:SANDWORM_MODE: Shai-Hulud-Style npm Worm Hijacks CI Workflows and Poisons AI Toolchains.Details
Socket
Book a DemoInstallSign in
Socket

add-clear

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

add-clear

jQuery plugin to add a clear button to text input fields

Source
npmnpm
Version
2.0.5
Version published
Maintainers
1
Created
Source

Author: Stephen Korecky
Website: http://stephenkorecky.com
Plugin Website: http://github.com/skorecky/Add-Clear
jQuery Plugin: http://plugins.jquery.com/add-clear/

About

Version 2.0

Add Clear is a jQuery plugin that adds a input clearing button on any input you apply it to. It clears the value, and returns focus to that field.

How to use

  • Load jQuery into your project
  • Load Add Clear plugin into your project
  • Setup which elements you would like to apply this plugin to.

Usage

$(function(){
  $("input").addClear();
});

// Example onClear option usage
$("input").addClear({
  onClear: function(){
    alert("call back!");
  }
});

Available Options

OptionDefaultType
closeSymbolstring
top1number
right4number
returnFocustrueboolean
showOnLoadfalseboolean
hideOnBlurfalseboolean
tabbabletrueboolean
onClearnullfunction

Keywords

jquery-plugin

FAQs

Package last updated on 14 Sep 2015

Did you know?

Socket

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.

Install

Related posts