"Input Car Form"
Bootstrap 3.3.0 Snippet by MaartenDT

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
<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 ---------->
<!--
Info: Booking Form
Description: Brand new customer adds a car / new car to their account.
==== Credit ====
Forked from Andi: http://codepen.io/andiio/pen/tFECp
font: Lato (google font)
Icon font: http://fontawesome.io/icons/
================================= -->
<form action="">
<!-- General -->
<div class="form-group">
<center><h1><u class="thick">Adding a Car to your Account</u></h1></center>
<br />
<br />
<br />
<h2 class="heading">Owner Details</h2>
<div class="controls">
<input type="text" id="name" class="floatLabel" name="name">
<label for="name">Name</label>
</div>
<div class="controls">
<input type="text" id="email" class="floatLabel" name="email">
<label for="email">Email</label>
</div>
<div class="controls">
<input type="tel" id="phone" class="floatLabel" name="phone">
<label for="phone">Phone</label>
</div>
<div class="grid">
<div class="col-2-3">
<div class="controls">
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
html, body, div, span, applet, object, iframe,
h1, h2, h3, h4, h5, h6, p, blockquote, pre,
a, abbr, acronym, address, big, cite, code,
del, dfn, em, img, ins, kbd, q, s, samp,
small, strike, strong, sub, sup, tt, var,
b, u, i, center,
dl, dt, dd, ol, ul, li,
fieldset, form, label, legend,
table, caption, tbody, tfoot, thead, tr, th, td,
article, aside, canvas, details, embed,
figure, figcaption, footer, header, hgroup,
menu, nav, output, ruby, section, summary,
time, mark, audio, video {
margin: 0;
padding: 0;
border: 0;
font: inherit;
font-size: 100%;
vertical-align: baseline;
}
html {
line-height: 1;
}
ol, ul {
list-style: none;
}
table {
border-collapse: collapse;
border-spacing: 0;
}
caption, th, td {
text-align: left;
font-weight: normal;
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
(function($){
function floatLabel(inputType){
$(inputType).each(function(){
var $this = $(this);
// on focus add cladd active to label
$this.focus(function(){
$this.next().addClass("active");
});
//on blur check field and remove class if needed
$this.blur(function(){
if($this.val() === '' || $this.val() === 'blank'){
$this.next().removeClass();
}
});
});
}
// just add a class of "floatLabel to the input field!"
floatLabel(".floatLabel");
})(jQuery);
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

Related: See More


Questions / Comments: