Skip to content

Commit bf7f108

Browse files
committed
README and Demo
1 parent 3226fa2 commit bf7f108

2 files changed

Lines changed: 5 additions & 2 deletions

File tree

README.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,10 @@ Since both these features LIVE, this widget __assists__ the user while filling o
2222
```html
2323
<script type="text/javascript" src="jquery.serialnumberinput.js"></script>
2424
```
25-
3. Add this script anywhere on the page. Configure it according to your needs.
25+
3. Add this script anywhere on the page. [Configure](#configuration) it according to your own needs.
2626
```html
2727
<script type="text/javascript">
28+
// If you want a separate configuration for each input box, you can replace the general input[type='serialnumber'] with specific IDs, Classes, etc.
2829
$("input[type='serialnumber']").serialnumberinput(
2930
{
3031
/*
@@ -64,7 +65,7 @@ Since both these features LIVE, this widget __assists__ the user while filling o
6465

6566
1. __`separator:`__ This property can be defined for the whole input box in general, or specially for each separator. Specific definitions override the general ones. (Default value is an empty string `""`)
6667

67-
2. __`pieces:`__ This is an array of the __`piece`__ objects.
68+
2. __`pieces:`__ This is an array of __`piece`__ objects.
6869

6970
a. __`length:`__ A positive integer denoting the number of character in a piece. (Default value is `1`)
7071

demo/index.html

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,10 @@ <h2>Demo</h2>
1212
<hr>
1313
<p>Enter a Serial Number in the format <b>000\00\A</b></p>
1414
<p style="color: red;">Anything else would lead to deletion of the entered character.</p>
15+
<p style="color: green;">The back-slash separator is added automatically.</p>
1516
<input type="serialnumber">
1617
<script type="text/javascript">
18+
// If you want a separate configuration for each input box, you can replace the general input[type='serialnumber'] with specific IDs, Classes, etc.
1719
$("input[type='serialnumber']").serialnumberinput(
1820
{
1921
/*

0 commit comments

Comments
 (0)