forked from gmgomess/jQuery-CPF-CNPJ-Validator-plugin
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathexample.html
29 lines (28 loc) · 858 Bytes
/
example.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<title>jQuery-CPF-CNPJ Plugin</title>
<style>
.error { border-color: #F70202 }
</style>
</head>
<body>
<input type="text" class="validate" />
<input type="button" class="btn" value="Test" />
<script src="http://code.jquery.com/jquery-2.1.1.min.js"></script>
<script src="jquery.cpfcnpj.js"></script>
<script type="text/javascript">
$(document).ready(function () {
$('.validate').cpfcnpj({
mask: false,
validate: 'cpfcnpj',
event: 'click',
handler: '.btn',
ifValid: function (input) { input.removeClass("error"); },
ifInvalid: function (input) { input.addClass("error"); }
});
});
</script>
</body>
</html>