Response title
This is preview!
01.
<style type=
"text/css"
title=
"currentStyle"
>
02.
step 1 :
03.
@import
"../../media/css/demo_page.css"
;
04.
@import
"../../media/css/demo_table.css"
;
05.
</style>
06.
07.
<script type=
"text/javascript"
language=
"javascript"
src=
"../../media/js/jquery.js"
></script>
08.
09.
<script type=
"text/javascript"
language=
"javascript"
src=
"../../media/js/jquery.dataTables.js"
></script>
10.
<link rel=
"stylesheet"
href=
"../../media/css/jquery.ui.all.css"
>
11.
<script src=
"../../media/js/jquery.ui.core.js"
></script>
12.
<script src=
"../../media/js/jquery.ui.widget.js"
></script>
13.
<script src=
"../../media/js/jquery.ui.tabs.js"
></script>
01.
$(document).ready(
function
() {
/* Initialise the DataTable */
02.
var
oTable1 = $(
'#example1'
).dataTable({
"oLanguage"
: {
"sSearch"
:
"Search all columns:"
} });
03.
var
oTable2 = $(
'#example2'
).dataTable({
"oLanguage"
: {
"sSearch"
:
"Search all columns:"
} });
04.
var
oTable3 = $(
'#example3'
).dataTable({
"oLanguage"
: {
"sSearch"
:
"Search all columns:"
} });
05.
/* Add a select menu for each TH element in the table footer */
06.
07.
08.
$(
"#example1 thead tr"
).clone().prependTo($(
"#example1 thead"
)).find(
"th"
).each(
function
(i) {
this
.innerHTML = fnCreateSelect(oTable1.fnGetColumnData(i));
09.
10.
$(
'select'
,
this
).change(
function
() {oTable1.fnFilter($(
this
).val(), i); }); } );
11.
12.
13.
$(
"#example2 thead tr"
).clone().prependTo($(
"#example2 thead"
)).find(
"th"
).each(
function
(i) {
this
.innerHTML = fnCreateSelect(oTable2.fnGetColumnData(i));
14.
15.
$(
'select'
,
this
).change(
function
() {oTable2.fnFilter($(
this
).val(), i); }); } );
16.
17.
$(
"#example3 thead tr"
).clone().prependTo($(
"#example3 thead"
)).find(
"th"
).each(
function
(i) {
this
.innerHTML = fnCreateSelect(oTable3.fnGetColumnData(i));
18.
19.
$(
'select'
,
this
).change(
function
() {oTable3.fnFilter($(
this
).val(), i); }); } );
20.
21.
22.
23.
24.
}
01.
<div id=
"tabs"
>
02.
<ul>
03.
<li><a href=
"#tabs-1"
>Table1</a></li>
04.
<li><a href=
"#tabs-2"
>Table2</a></li>
05.
<li><a href=
"#tabs-3"
>Table3</a></li>
06.
</ul>
07.
<div id=
"tabs-1"
>
08.
<p><strong>Click
this
tab again to close the content pane.</strong></p>
09.
10.
<div id=
"demo1"
>
11.
<table cellpadding=
"0"
cellspacing=
"0"
border=
"0"
class=
"display"
id=
"example1"
>
12.
13.
<thead>
14.
<tr>
15.
<th>Rendering engine</th>
16.
<th>Browser</th>
17.
<th>Platform(s)</th>
18.
<th>Engine version</th>
19.
<th>CSS grade</th>
20.
</tr>
21.
</thead>
22.
//.....................tbody
23.
//.....................tfoot
24.
//........................table
25.
</div>
26.
</div>
27.
28.
29.
<div id=
"tabs-2"
>
30.
<p><strong>Click
this
tab again to close the content pane.</strong></p>
31.
32.
<div id=
"demo2"
>
33.
<table cellpadding=
"0"
cellspacing=
"0"
border=
"0"
class=
"display"
id=
"example2"
>
34.
35.
<thead>
36.
<tr>
37.
<th>Rendering engine</th>
38.
<th>Browser</th>
39.
<th>Platform(s)</th>
40.
<th>Engine version</th>
41.
<th>CSS grade</th>
42.
</tr>
43.
</thead>
44.
//.....................tbody
45.
//.....................tfoot
46.
//........................table
47.
</div>
48.
</div>
49.
50.
<div id=
"tabs-3"
>
51.
<p><strong>Click
this
tab again to close the content pane.</strong></p>
52.
53.
<div id=
"demo3"
>
54.
<table cellpadding=
"0"
cellspacing=
"0"
border=
"0"
class=
"display"
id=
"example3"
>
55.
56.
<thead>
57.
<tr>
58.
<th>Rendering engine</th>
59.
<th>Browser</th>
60.
<th>Platform(s)</th>
61.
<th>Engine version</th>
62.
<th>CSS grade</th>
63.
</tr>
64.
</thead>
65.
//.....................tbody
66.
//.....................tfoot
67.
//........................table
68.
</div>
69.
</div>
70.
71.
</div>
© 2013 jQuery Foundation
Sponsored by and others.