"Responsive breadcrumbs"
Bootstrap 3.1.0 Snippet by outsideMyBox

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.1.0/css/bootstrap.min.css" rel="stylesheet" id="bootstrap-css">
<script src="//netdna.bootstrapcdn.com/bootstrap/3.1.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 href="//netdna.bootstrapcdn.com/font-awesome/4.0.3/css/font-awesome.css" rel="stylesheet">
<div class="container">
<div class="row">
<h2>Breadcrumbs 1 (6 elements)</h2>
<div id="bc1" class="btn-group btn-breadcrumb">
<a href="#" class="btn btn-default"><i class="fa fa-home"></i></a>
<div class="btn btn-default">...</div>
<a href="#" class="btn btn-default"><div>label 1</div></a>
<a href="#" class="btn btn-default"><div>label 2. A very very long one to truncate</div></a>
<a href="#" class="btn btn-default"><div>label 3</div></a>
<a href="#" class="btn btn-default"><div>label 4</div></a>
<a href="#" class="btn btn-default"><div>label 5</div></a>
<a href="#" class="btn btn-default"><div>label 6. A very very long one to truncate</div></a>
</div>
</div>
<div class="row">
<h2>Breadcrumbs 2 (8 elements)</h2>
<div id="bc2" class="btn-group btn-breadcrumb">
<a href="#" class="btn btn-default"><i class="fa fa-home"></i></a>
<div class="btn btn-default">...</div>
<a href="#" class="btn btn-default"><div>label 1. A very very long one to truncate</div></a>
<a href="#" class="btn btn-default"><div>label 2</div></a>
<a href="#" class="btn btn-default"><div>label 3</div></a>
<a href="#" class="btn btn-default"><div>label 4</div></a>
<a href="#" class="btn btn-default"><div>label 5. A very very long one to truncate</div></a>
<a href="#" class="btn btn-default"><div>label 6</div></a>
<a href="#" class="btn btn-default"><div>label 7</div></a>
<a href="#" class="btn btn-default"><div>label 8</div></a>
</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
25
26
27
28
29
30
31
32
33
34
35
36
37
/* Breadcrumbs from http://bootsnipp.com/snippets/featured/triangle-breadcrumbs-arrows */
.btn-breadcrumb .btn:not(:last-child):after {
content: " ";
display: block;
width: 0;
height: 0;
border-top: 17px solid transparent;
border-bottom: 17px solid transparent;
border-left: 10px solid white;
position: absolute;
top: 50%;
margin-top: -17px;
left: 100%;
z-index: 3;
}
.btn-breadcrumb .btn:not(:last-child):before {
content: " ";
display: block;
width: 0;
height: 0;
border-top: 17px solid transparent;
border-bottom: 17px solid transparent;
border-left: 10px solid rgb(173, 173, 173);
position: absolute;
top: 50%;
margin-top: -17px;
margin-left: 1px;
left: 100%;
z-index: 3;
}
.btn-breadcrumb .btn {
padding:6px 12px 6px 24px;
}
.btn-breadcrumb .btn:first-child {
padding:6px 6px 6px 10px;
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
1
2
3
4
5
6
7
8
9
10
11
12
13
$(document).ready(function(){
$(window).resize(function() {
ellipses1 = $("#bc1 :nth-child(2)")
if ($("#bc1 a:hidden").length >0) {ellipses1.show()} else {ellipses1.hide()}
ellipses2 = $("#bc2 :nth-child(2)")
if ($("#bc2 a:hidden").length >0) {ellipses2.show()} else {ellipses2.hide()}
})
});
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

Related: See More


Questions / Comments: