mirror of
https://github.com/DataTables/DataTables.git
synced 2025-03-15 16:29:16 +01:00
Shorter way to get the column title
I'd be happy for the change to be released under the MIT license ;)
This commit is contained in:
parent
021f0d0c7d
commit
4d25479434
@ -1 +1 @@
|
||||
9780a3693572757d87bf70e48bd7555faf974f28
|
||||
700b2ea95e09f82b63962595edc78f25313ac925
|
||||
|
@ -31,7 +31,7 @@
|
||||
$(document).ready(function() {
|
||||
// Setup - add a text input to each footer cell
|
||||
$('#example tfoot th').each( function () {
|
||||
var title = $('#example thead th').eq( $(this).index() ).text();
|
||||
var title = $(this).text();
|
||||
$(this).html( '<input type="text" placeholder="Search '+title+'" />' );
|
||||
} );
|
||||
|
||||
@ -564,7 +564,7 @@ $(document).ready(function() {
|
||||
<p>The Javascript shown below is used to initialise the table shown in this example:</p><code class="multiline language-js">$(document).ready(function() {
|
||||
// Setup - add a text input to each footer cell
|
||||
$('#example tfoot th').each( function () {
|
||||
var title = $('#example thead th').eq( $(this).index() ).text();
|
||||
var title = $(this).text();
|
||||
$(this).html( '<input type="text" placeholder="Search '+title+'" />' );
|
||||
} );
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user