Skip to content

Commit 40ed82a

Browse files
committed
Some help
1 parent 9717d30 commit 40ed82a

File tree

1 file changed

+20
-1
lines changed

1 file changed

+20
-1
lines changed

README.md

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@
22
Set values to INPUTS types CHECKBOX and RADIO
33

44
This class allows the INPUT element types RADIO and CHECKBOX to behave more naturally as inputs with type text
5+
>The values of the elements
6+
>>0 =false
7+
>>1 =true
58
69
## Dependence
710

@@ -37,6 +40,22 @@ var elements=document.getElementsByTagName("input");
3740
var pointer=new pseudoNatural(elements);
3841

3942
//add new element to class
40-
var element=document.getElementById("someID")
43+
var element=document.getElementById("someID");
4144
pointer.addElement(element);
45+
```
46+
47+
Usage
48+
-----
49+
- **Change value**
50+
```javascript
51+
//select element and change his value
52+
document.getElementById("someID").value=1;
53+
//and that's it, the script will be take care of the rest
54+
```
55+
56+
- **Get value from radio group**
57+
```javascript
58+
//select element and change his value
59+
document.querySelector("input[name='SomeRadiosName']").nameValue();
60+
//and that's it, method returns the index of the selected element
4261
```

0 commit comments

Comments
 (0)