From 4d25479434dadcc3e46152a4e492d02a10c47607 Mon Sep 17 00:00:00 2001 From: Allan Jardine Date: Tue, 17 Nov 2015 11:13:58 +0000 Subject: [PATCH] Shorter way to get the column title I'd be happy for the change to be released under the MIT license ;) --- .datatables-commit-sync | 2 +- examples/api/multi_filter.html | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.datatables-commit-sync b/.datatables-commit-sync index acaeeb79..b5239590 100644 --- a/.datatables-commit-sync +++ b/.datatables-commit-sync @@ -1 +1 @@ -9780a3693572757d87bf70e48bd7555faf974f28 +700b2ea95e09f82b63962595edc78f25313ac925 diff --git a/examples/api/multi_filter.html b/examples/api/multi_filter.html index e864ca0a..9e56ab2b 100644 --- a/examples/api/multi_filter.html +++ b/examples/api/multi_filter.html @@ -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( '' ); } ); @@ -564,7 +564,7 @@ $(document).ready(function() {

The Javascript shown below is used to initialise the table shown in this example:

$(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+'" />' ); } );