InputGurd.js
This Will Keep Your Input Elements Safe.
Requires
- jQuery 3.2.1+
Installation
- First, make sure you are using valid DOCTYPE
- Include nessesary JS files
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script>
<script src="js/InputGurd.js" ></script>
Rules
- If You Delete A Protected Input Element, Page Will Refresh
- Non Unique Id’s Are Not Allowed
- I Removed Attribute_Lock From These Attributes
- Class
- Style
Usage
If You Need To Apply InputGurd To Specific Area You Must Try This.
$('#login').InputGurd();
Add ‘NoGurd’ Attribute to prevent InputGurd.
<input NoGurd ... >
Add ‘nt-‘ Prefixes to Attribute for prevent Attribute_Lock.
<input nt-placeholder="Password" ... >
Add ‘unique-‘ Prefixes To Set Unique Attribute
- ‘unique-‘ Attribute Will Be Hide After First Run
<input unique-ng-model ng-model="test" ... >
If You Need To Apply InputGurd To Specific Element.
<input InputGurd ... >
Author Information
InputGurd.js was created by Thanura Nadun.