"Contact List"
Bootstrap 3.1.0 Snippet by Zinatra

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 ---------->
<a href="http://bootsnipp.com/mouse0270/snippets/4l0k2" class="btn btn-danger hide" id="back-to-bootsnipp">Back to Bootsnipp</a>
<div class="container">
<div class="row">
<h3>Developer Question</h3>
<p>Can anyone tell me why this snippet flashes after the tooltip is removed from the DOM? It is driving me crazy!</p>
<hr/>
<h3>Developer Answer</h3>
<p>It appears that tooltips do not like to be removed from within an <code>iframe</code> and cause the page to <em><strong>flash</strong></em>. If you are experiencing this issue with the tooltips please <a id="fullscreen" href="#fullscreen">click here</a> to view this snippet in an iframe.</p>
</div>
<div class="row form-group">
<h3>Onwards to the snippet!</h3>
<p>This snippet is a minimal contact list that allows you to search for anyone in the list by name, location, phone number or email.</p>
<p> Give it a shot search for <code>s@</code> and you'll get everyone whos last character in their email is <code>S</code></p>
<p> Or search for <code>Ln</code> and you'll get everyone whos location is a <code>Lane</code> rather than a <code>Street</code> or <code>Drive</code>.</p>
<p> Or search for <code>22</code> and you'll get everyone whos phone number or location has a <code>22</code> in it.</p>
<hr/>
</div>
<div class="row">
<div class="col-xs-12 col-sm-offset-3 col-sm-6">
<div class="panel panel-default">
<div class="panel-heading c-list">
<span class="title">Contacts</span>
<ul class="pull-right c-controls">
<li><a href="#cant-do-all-the-work-for-you" data-toggle="tooltip" data-placement="top" title="Add Contact"><i class="glyphicon glyphicon-plus"></i></a></li>
<li><a href="#" class="hide-search" data-command="toggle-search" data-toggle="tooltip" data-placement="top" title="Toggle Search"><i class="fa fa-ellipsis-v"></i></a></li>
</ul>
</div>
<div class="row" style="display: none;">
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
@import url(//netdna.bootstrapcdn.com/font-awesome/4.0.3/css/font-awesome.css);
body {
padding: 30px 0px 60px;
}
.panel > .list-group .list-group-item:first-child {
/*border-top: 1px solid rgb(204, 204, 204);*/
}
@media (max-width: 767px) {
.visible-xs {
display: inline-block !important;
}
.block {
display: block !important;
width: 100%;
height: 1px !important;
}
}
#back-to-bootsnipp {
position: fixed;
top: 10px; right: 10px;
}
.c-search > .form-control {
border-radius: 0px;
border-width: 0px;
border-bottom-width: 1px;
font-size: 1.3em;
padding: 12px 12px;
height: 44px;
outline: none !important;
}
.c-search > .form-control:focus {
outline:0px !important;
-webkit-appearance:none;
box-shadow: none;
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 () {
/* BOOTSNIPP FULLSCREEN FIX */
if (window.location == window.parent.location) {
$('#back-to-bootsnipp').removeClass('hide');
}
$('[data-toggle="tooltip"]').tooltip();
$('#fullscreen').on('click', function(event) {
event.preventDefault();
window.parent.location = "http://bootsnipp.com/iframe/4l0k2";
});
$('a[href="#cant-do-all-the-work-for-you"]').on('click', function(event) {
event.preventDefault();
$('#cant-do-all-the-work-for-you').modal('show');
})
$('[data-command="toggle-search"]').on('click', function(event) {
event.preventDefault();
$(this).toggleClass('hide-search');
if ($(this).hasClass('hide-search')) {
$('.c-search').closest('.row').slideUp(100);
}else{
$('.c-search').closest('.row').slideDown(100);
}
})
$('#contact-list').searchable({
searchField: '#contact-list-search',
selector: 'li',
childSelector: '.col-xs-12',
show: function( elem ) {
elem.slideDown(100);
},
hide: function( elem ) {
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

Related: See More


Questions / Comments: