"Biometrics"
Bootstrap 3.3.0 Snippet by kenyeung

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
<link href="//maxcdn.bootstrapcdn.com/bootstrap/3.3.0/css/bootstrap.min.css" rel="stylesheet" id="bootstrap-css">
<script src="//maxcdn.bootstrapcdn.com/bootstrap/3.3.0/js/bootstrap.min.js"></script>
<script src="//code.jquery.com/jquery-1.11.1.min.js"></script>
<!------ Include the above in your HEAD tag ---------->
<!-- All the files that are required -->
<link href="//netdna.bootstrapcdn.com/font-awesome/4.0.3/css/font-awesome.min.css" rel="stylesheet" type="text/css" />
<link href='http://fonts.googleapis.com/css?family=Varela+Round' rel='stylesheet' type='text/css'>
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery-validate/1.13.1/jquery.validate.min.js"></script>
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1" />
<div class="text-center" style="padding:50px 0">
<div class="container">
<div class="row">
<div class="col-lg-12">
<p><h1>Please say 'I am Ken'</h1></p>
<p>
<form id="login-form">
<button type="submit" class="login-button btn btn-sq-lg btn-primary"><i class="fa fa-microphone fa-5x"></i></button>
</form>
</p>
</div>
</div>
</div>
</div>
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
.btn-sq-lg {
width: 150px !important;
height: 150px !important;
}
.btn-sq {
width: 100px !important;
height: 100px !important;
font-size: 10px;
}
.btn-sq-sm {
width: 50px !important;
height: 50px !important;
font-size: 10px;
}
.btn-sq-xs {
width: 25px !important;
height: 25px !important;
padding:2px;
}
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
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
(function($) {
"use strict";
// Options for Message
//----------------------------------------------
var options = {
'btn-loading': '<i class="fa fa-spinner fa-pulse"></i>',
'btn-success': '<i class="fa fa-check"></i>',
'btn-error': '<i class="fa fa-remove"></i>',
'msg-success': 'All Good! Redirecting...',
'msg-error': 'Wrong login credentials!',
'useAJAX': true,
};
// Login Form
//----------------------------------------------
// Validation
$("#login-form").validate({
rules: {
lg_username: "required",
lg_password: "required",
},
errorClass: "form-invalid"
});
// Form Submission
$("#login-form").submit(function() {
remove_loading($(this));
if(options['useAJAX'] == true)
{
// Dummy AJAX request (Replace this with your AJAX code)
// If you don't want to use AJAX, remove this
dummy_submit_form($(this));
// Cancel the normal submission.
// If you don't want to use AJAX, remove this
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

Related: See More


Questions / Comments: