"Property Type Radio Button Group"
Bootstrap 3.2.0 Snippet by kobusvanwykk

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="//netdna.bootstrapcdn.com/bootstrap/3.2.0/css/bootstrap.min.css" rel="stylesheet" id="bootstrap-css">
<script src="//netdna.bootstrapcdn.com/bootstrap/3.2.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 ---------->
<link rel="stylesheet" href="//maxcdn.bootstrapcdn.com/font-awesome/4.3.0/css/font-awesome.min.css">
<link href='http://fonts.googleapis.com/css?family=Open+Sans:400,600,700' rel='stylesheet' type='text/css'>
<link rel="stylesheet" href="https://dl.dropboxusercontent.com/u/86701580/mypersonalcdn/renda/renda-icon-font.css">
<div class="container">
<h3>Property Type Radio Button Group</h3>
<div class="btn-group prop-type-group"id="prop-type-group" data-toggle="buttons">
<label class="btn btn-default prop-type active">
<input type="radio" name="options" id="option2" autocomplete="off" chacked>
<span class="icon icon-condo"></span>
<span class="prop-type-word">Condo</span>
</label>
<label class="btn btn-default prop-type">
<input type="radio" name="options" id="option1" autocomplete="off">
<span class="icon icon-family"></span>
<span class="prop-type-word">Single<br class="mobile-br"> family</span>
</label>
<label class="btn btn-default prop-type">
<input type="radio" name="options" id="option2" autocomplete="off">
<span class="icon icon-townhouse"></span>
<span class="prop-type-word">Town<br class="mobile-br"> house</span>
</label>
<label class="btn btn-default prop-type">
<input type="radio" name="options" id="option2" autocomplete="off">
<span class="icon icon-vacationhome"></span>
<span class="prop-type-word">Vacation<br class="mobile-br"> home</span>
</label>
<label class="btn btn-default prop-type">
<input type="radio" name="options" id="option2" autocomplete="off">
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
body {
font-family: "open sans", Helvetica, Arial, sans-serif
}
.btn span.icon {
opacity: 1;
color: #909090;
font-size: 32px;
width: 27px;
display: block;
margin: 0 auto;
height: 24px;
line-height: 24px;
}
.btn.active span.icon {
opacity: 1;
color: #fff;
font-size: 32px;
width: 27px;
display: block;
margin: 0 auto;
height: 24px;
line-height: 24px;
}
.btn.active {
background: #7BB712;
}
.container {
width: 100%;
margin: 0 auto;
}
.prop-type {
width: 16.66%
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
1
2
3
4
5
6
7
8
9
10
11
$(window).resize(function() {
if ($(window).width() <= 600) {
$('#prop-type-group').removeClass('btn-group');
$('#prop-type-group').addClass('btn-group-vertical');
} else {
$('#prop-type-group').addClass('btn-group');
$('#prop-type-group').removeClass('btn-group-vertical');
}
});
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

Related: See More


Questions / Comments: