combine Tabletool and individual column filtering
combine Tabletool and individual column filtering
zorgglub
Posts: 3Questions: 0Answers: 0
Hi,
I want to combine the two fonctions but i cant
[code]$(document).ready(function() {
TableToolsInit.sSwfPath = "table/swf/ZeroClipboard.swf";
var oTable = $('#example').dataTable( {
"oLanguage": {
"sSearch": "Search all columns:"
}
});
$("tfoot input").keyup( function () {
/* Filter on the column (the index) of this element */
oTable.fnFilter( this.value, $("tfoot input").index(this) );
} );
/*
* Support functions to provide a little bit of 'user friendlyness' to the textboxes in
* the footer
*/
$("tfoot input").each( function (i) {
asInitVals[i] = this.value;
} );
$("tfoot input").focus( function () {
if ( this.className == "search_init" )
{
this.className = "";
this.value = "";
}
} );
$("tfoot input").blur( function (i) {
if ( this.value == "" )
{
this.className = "search_init";
this.value = asInitVals[$("tfoot input").index(this)];
}
} );
} );[/code]
AND
[code]$(document).ready( function () {
TableToolsInit.sSwfPath = "table/swf/ZeroClipboard.swf";
$('#example').dataTable( {
"sDom": 'T<"clear">lfrtip'
} );[/code]
on the same table -> example
Thanks
Zorgglub
I want to combine the two fonctions but i cant
[code]$(document).ready(function() {
TableToolsInit.sSwfPath = "table/swf/ZeroClipboard.swf";
var oTable = $('#example').dataTable( {
"oLanguage": {
"sSearch": "Search all columns:"
}
});
$("tfoot input").keyup( function () {
/* Filter on the column (the index) of this element */
oTable.fnFilter( this.value, $("tfoot input").index(this) );
} );
/*
* Support functions to provide a little bit of 'user friendlyness' to the textboxes in
* the footer
*/
$("tfoot input").each( function (i) {
asInitVals[i] = this.value;
} );
$("tfoot input").focus( function () {
if ( this.className == "search_init" )
{
this.className = "";
this.value = "";
}
} );
$("tfoot input").blur( function (i) {
if ( this.value == "" )
{
this.className = "search_init";
this.value = asInitVals[$("tfoot input").index(this)];
}
} );
} );[/code]
AND
[code]$(document).ready( function () {
TableToolsInit.sSwfPath = "table/swf/ZeroClipboard.swf";
$('#example').dataTable( {
"sDom": 'T<"clear">lfrtip'
} );[/code]
on the same table -> example
Thanks
Zorgglub
This discussion has been closed.
Replies
[code]
$(document).ready(function() {
TableToolsInit.sSwfPath = "table/swf/ZeroClipboard.swf";
var oTable = $('#example').dataTable( {
"sDom": 'T<"clear">lfrtip',
"oLanguage": {
"sSearch": "Search all columns:"
}
});
$("tfoot input").keyup( function () {
/* Filter on the column (the index) of this element */
oTable.fnFilter( this.value, $("tfoot input").index(this) );
} );
/*
* Support functions to provide a little bit of 'user friendlyness' to the textboxes in
* the footer
*/
$("tfoot input").each( function (i) {
asInitVals[i] = this.value;
} );
$("tfoot input").focus( function () {
if ( this.className == "search_init" )
{
this.className = "";
this.value = "";
}
} );
$("tfoot input").blur( function (i) {
if ( this.value == "" )
{
this.className = "search_init";
this.value = asInitVals[$("tfoot input").index(this)];
}
} );
} );
[/code]