forked from kewljedi/jquery-creditcards
-
Notifications
You must be signed in to change notification settings - Fork 0
/
example.html
52 lines (42 loc) · 1.1 KB
/
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
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
<!DOCTYPE HTML>
<html>
<head>
<script src="http://code.jquery.com/jquery-1.6.4.min.js"></script>
<script src="jquery-creditcards.js"></script>
<link src="creditcardsprite.css"/>
</head>
<body>
<form>
<p>Using plugin in default mode</p>
<div id="cc"></div>
<br />
<br />
<p>Using plugin in config'd mode</p>
<div id="cc2">
<div id="textboxHolder">
<input type="text" name="MyCustomTextBox" id="myCustomTextBox" value="" >
<input type="text" name="MyCustomCCVTextBox" id="myCustomCCV" value="" >
</div>
<div id="imageHolder"></div>
</div>
</form>
<script>
$(document).ready(
function ()
{
// Just create the credit card validation control
$("#cc").creditcardvalidation( );
// Create the credit card validation using custom html
$("#cc2").creditcardvalidation( {
inputTextBoxID: "myCustomTextBox",
imageDivID: "imageHolder",
ccvTextBoxID: "myCustomCCV",
callback: function () {
alert ("Is CCN valid? " + this.isCCNvalid + " | Is CCV valid? " + this.isCCVvalid);
}
});
}
)
</script>
</body>
</html>