Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/fernandocarletti/labelme
jQuery extension to label form items
https://github.com/fernandocarletti/labelme
Last synced: about 1 month ago
JSON representation
jQuery extension to label form items
- Host: GitHub
- URL: https://github.com/fernandocarletti/labelme
- Owner: fernandocarletti
- Created: 2011-09-13T15:49:15.000Z (about 13 years ago)
- Default Branch: master
- Last Pushed: 2011-10-17T18:32:45.000Z (about 13 years ago)
- Last Synced: 2024-10-09T17:55:49.875Z (about 1 month ago)
- Language: JavaScript
- Homepage:
- Size: 97.7 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# What is this?
labelMe is a jQuery extension to place field labels inside the elements (except checkbox and radio buttons, that can be placed after or before the element).
## How does it works?
It simply add the text that's defined in an attribute at the element. There's some options to add/remove class to the labeled element, add line break after, change the position of radio/checkbox labels (before and after) and clean the label (if field is not set) value when submit the form.
## Configuring
There are some configuratioin options:
* labelAttr - The attribute containing the label (default: rel).
* blurClass - The class placed in element when the element lose focus (default: label_blur).
* labelClass - Label class for labels created for checkboxes and radio buttons (default: label).
* addLineBreak - Boolean value, true if you want a line break tag after the elements (default: false).
* labelBefore - Boolean value, true if you want to add the label before checkbox or radio button (default: false).
* cleanOnFormSubmit - Boolean value, true if you want to clean the default label value (default: true).## Usage
Using default configuration:
$('.label').labelMe();Using custom configuration:
$('.label').labelMe({ 'labelAttr': 'rel', 'labelBefore': true });Custom blur class:
In css file:
.custom_blur {
font-weight: bold;
color:red;
}In js file:
$('.label').labelMe({ 'blurClass': 'custom_blur' });