Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/theodorton/jquery.changeable
jQuery plugin for simple click-to-edit form fields
https://github.com/theodorton/jquery.changeable
Last synced: 20 days ago
JSON representation
jQuery plugin for simple click-to-edit form fields
- Host: GitHub
- URL: https://github.com/theodorton/jquery.changeable
- Owner: theodorton
- Created: 2011-07-13T04:27:36.000Z (over 13 years ago)
- Default Branch: master
- Last Pushed: 2011-07-13T05:19:19.000Z (over 13 years ago)
- Last Synced: 2024-11-10T23:13:26.823Z (about 1 month ago)
- Language: JavaScript
- Homepage:
- Size: 97.7 KB
- Stars: 1
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# jQuery Changeable Plugin
Hide your form fields and make users edit by double-clicking a value label instead.## Example #1
__HTML:__
```html
```
__JAVASCRIPT:__```javascript
$(document).ready(function(){
$('form#my-form input').changeable();
});
```## Example #2 (with options)
__HTML:__
```html
Looks like you've made som edits!
```
__JAVASCRIPT:__
```javascript
$(document).ready(function(){
$('.changeable').changeable({
editBehaviour: 'click',
helperText: 'Click to edit this field! Then click outside to save.',
notifierClass: 'notify-on-save',
saveOnEnter: false
});
});
```## Options
### editBehaviour (default: 'dblclick')
Can be any event type (click, mouseover) that jQuery bind() handles.### helperText (default: 'Doubleclick to edit.')
The text that will be displayed when the mouse hovers over the value.### notifierClass (default: null)
A CSS class that will (initially be hidden) and showed when a user changes a field.### saveOnEnter (default: true)
Saves the field when the user presses enter key, if set to false enter will not do anything.## License
You may use this plugin for any non-commercial projects.Please feel free to contact me if you want to use this in commercial projects.