Skip to content

Latest commit

 

History

History
30 lines (22 loc) · 614 Bytes

README.md

File metadata and controls

30 lines (22 loc) · 614 Bytes

maxlengthJS

Javascript maxlength validator

preview

Installation

Include jQuery

Include maxlength.css and maxlength.js

Usage

Give jQuery element selector to new Maxlength instance

<script type="text/javascript">
// for all inputs
new Maxlength('input');

// for text type inputs
new Maxlength('input[type=text]');

// for inputs which have maxlength attribute
new Maxlength('input[maxlength]');

// for specific input
new Maxlength('#inputId');
</script>

Customization

You can write your own css code inside --maxlength class to change look