https://github.com/webpolis/dltoggleinput
jQuery Plugin
https://github.com/webpolis/dltoggleinput
Last synced: 11 months ago
JSON representation
jQuery Plugin
- Host: GitHub
- URL: https://github.com/webpolis/dltoggleinput
- Owner: webpolis
- Created: 2012-07-05T05:59:19.000Z (almost 14 years ago)
- Default Branch: master
- Last Pushed: 2012-07-05T06:30:40.000Z (almost 14 years ago)
- Last Synced: 2025-03-04T23:42:25.878Z (over 1 year ago)
- Language: JavaScript
- Size: 102 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
dlToggleInput - jQuery Plugin
=============================
This plugin allows you to manually disable a text field or reset its contents through a nice
graphical interface. It also allows you to insert an icon in front of the field when it's on disabled state.
Options:
disabled: true if you want to disable this field by default
keepValue: true if you want to keep the value when the enable/reset button is clicked
disabledColor: HTML color code used as background
imgStateDisabled: URL pointing to the icon which represents the content of the field
imgStateDisabledWidth: size (width) in pixels of the icon shown when field is disabled
imgStateEnable: URL pointing to image button which resets the field
clearSelector: optional, if you want to display a neighboor element on reset
onClear: optional, callback executed on reset
Example:
$('input').dlToggleInput({
disabled:true,
imgStateDisabled: '/images/icons/user.png',
imgStateDisabledWidth: 20,
imgStateEnable: '/images/clear.png',
onClear: function(el){
alert('Reset!');
}
});