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
<!DOCTYPE html>
<html>
<head>
<title>Card — the better way to collect credit cards</title>
<link rel="stylesheet" href="../lib/css/card.css">
</head>
<body>
<style>
.demo-container {
width: 350px;
margin: 50px auto;
}
form {
margin: 30px;
}
input {
width: 200px;
margin: 10px auto;
display: block;
}
</style>
<div class="demo-container">
<div class="card-wrapper"></div>
<div class="form-container active">
<form action="">
<input placeholder="Card number" type="text" name="number">
<input placeholder="Full name" type="text" name="name">
<input placeholder="MM/YY" type="text" name="expiry">
<input placeholder="CVC" type="text" name="cvc">
</form>
</div>
</div>
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<script src="../lib/js/card.js"></script>
<script>
$('.active form').card({ container: $('.card-wrapper')})
</script>
</body>
</html>