Automatically Format User Input With The Simple Input Plugin
| File Size: | 2.87 KB |
|---|---|
| Views Total: | 468 |
| Last Update: | |
| Publish Date: | |
| Official Website: | Go to website |
| License: | MIT |
Simple Input is a jQuery based input enhancement plugin that can be used to format user input and restrict input values in an easy way.
Features:
- Automatically removes the first space on the input field.
- Automatically capitalizes the first letter of every word.
- Restricts the input to alphabet characters.
How to use it:
1. Insert the Simple Input plugin after jQuery library.
<script src="/path/to/cdn/jquery.slim.min.js"></script> <script src="/path/to/simple-input.js"></script>
2. Initialize the plugin on the input field and done. By default, the plugin will automatically removes the first space and capitalize the first letter typed by the user.
<input type="text" />
$(function(){
$('input').simpleInput();
});
3. Determine whether to capitalizes the first letter of every word. Default: false.
$(function(){
$('input').simpleInput({
capitalizeAll: true
});
});
4. Determine if this input only allows alphabet characters. Default: false.
$(function(){
$('input').simpleInput({
title: true
});
});
This awesome jQuery plugin is developed by alicard. For more Advanced Usages, please check the demo page or visit the official website.











