"jQuery Searchable Plugin"
Bootstrap 3.1.0 Snippet by thangtv

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 ---------->
<div class="container">
<div class="row">
<div class="col-lg-12">
<div class="page-header">
<h1>jQuery Searchable Plugin</h1>
</div>
<p>You can find the source of this plugin at <a href="http://github.com/stidges/jquery-searchable" target="_blank">Github</a> (http://github.com/stidges/jquery-searchable)!</p>
</div>
</div>
<div class="row">
<div class="col-lg-12">
<h3>Table / Fuzzy search example</h3>
</div>
</div>
<div class="row">
<div class="col-lg-4 col-lg-offset-4">
<input type="search" id="search" value="" class="form-control" placeholder="Search using Fuzzy searching">
</div>
</div>
<div class="row">
<div class="col-lg-12">
<table class="table" id="table">
<thead>
<tr>
<th>First column</th>
<th>Second column</th>
<th>Third column</th>
</tr>
</thead>
<tbody>
<tr>
<td>Introducing</td>
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
1
2
3
4
.row-padding {
margin-top: 25px;
margin-bottom: 25px;
}
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
$(function () {
$( '#table' ).searchable({
striped: true,
oddRow: { 'background-color': '#f5f5f5' },
evenRow: { 'background-color': '#fff' },
searchType: 'fuzzy'
});
$( '#searchable-container' ).searchable({
searchField: '#container-search',
selector: '.row',
childSelector: '.col-xs-4',
show: function( elem ) {
elem.slideDown(100);
},
hide: function( elem ) {
elem.slideUp( 100 );
}
})
});
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

Related: See More


Questions / Comments: