Skip to content

redpmorg/js_tools

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 

Repository files navigation

JS_Tools

Miscellaneous JavaScript/jQuery Tools

check_inactivity.js

Description:
Check inactivity until mouse button or keydown event is fired and reset the counter.
If not, user will be logged out after 10 minutes.

How to work:

Add in your html file:
<span id="counter"></span>
<script type="text/javascript" src="check_inactivity.js"></script>

Done!

validation_rules.js

Description:
Simple client side validation rules.
Multilingual messages! (en, fr, ro) ...

How to work:

In your html file:
<input type="text" data-req='{"text": "notEmpty"}'/>
<input type="text" data-req='{"integer": "isValid"}'/>
<input type="text" data-req='{"url": "isValid"}'/>
<input type="text" data-req='{"color": "isValid"}'/>
<input type="text" data-req='{"email": "isValid"}'/>
<input type="text" data-req='{"email": "validDomain"}'/>
<input type="text" data-req='{"dateSimple": "isValid"}'/>
<input type="text" data-req='{"dateComplex": {"greaterThan":"nameOfOtherDateElementOnSameForm"}}'/>

<script type="text/javascript" src="jquery.min.js"></script>
<script type="text/javascript" src="validation_rules.js"></script>

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published