Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/luizfonseca/required
Simple jQuery plugin to alert the user when the field is required or not. Supports callback & other events.
https://github.com/luizfonseca/required
Last synced: 19 days ago
JSON representation
Simple jQuery plugin to alert the user when the field is required or not. Supports callback & other events.
- Host: GitHub
- URL: https://github.com/luizfonseca/required
- Owner: luizfonseca
- Created: 2011-09-26T20:20:35.000Z (about 13 years ago)
- Default Branch: master
- Last Pushed: 2011-10-06T16:36:50.000Z (about 13 years ago)
- Last Synced: 2024-10-24T18:41:11.791Z (27 days ago)
- Language: JavaScript
- Homepage:
- Size: 102 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Presenting the (not so) awesome jQuery Required
## Usage
- First, download it (and the jQuery plugin, derp).
- Put it in your header or after the body tag
```javascript
```- Bla bla bla
- Use it this way:
```javascript
$('form.your_form_dude').required();
```- Or like this:
```javascript
$('form.your_form_dude').required({
header: "Here goes an header, like an H3"
message: "Which message do you want after the element name, sir? Can be any element!!11"
});
```
- You have to setup a stylesheet for this plugin (or you can pick one from the samples folder). In fact, I'm using only three elements, these:```css
#message_overflow {}
#message_from_required {}
#message_close_required {}
```- Note that ```#message_overflow``` is the main_box, the "wrapper" and ```#message_from_required``` is where I put the errors.
- Share it. Yeah. Spread it.
TODO: improve it.