Sort and Individual column filtering from the head
Sort and Individual column filtering from the head
i want Sort and Individual column filtering from head.
EXAMPLE 1: only sort, even when i make click on input heade.
[code]
Rendering engine
Browser
Platform(s)
Engine version
CSS grade
[/code]
EXAMPLE 2: sort and filter, but i want that the title is on the input filter.
[code]
Rendering engine
Browser
Platform(s)
Engine version
CSS grade
[/code]
(sorry my english, i from Chile, and speak spanish)
EXAMPLE 1: only sort, even when i make click on input heade.
[code]
Rendering engine
Browser
Platform(s)
Engine version
CSS grade
[/code]
EXAMPLE 2: sort and filter, but i want that the title is on the input filter.
[code]
Rendering engine
Browser
Platform(s)
Engine version
CSS grade
[/code]
(sorry my english, i from Chile, and speak spanish)
This discussion has been closed.
Replies
my code solution:
[code]
$("thead input").click( function (e) { // i add this.
stopTableSorting(e);
this.focus();
});
$("thead input").keyup( function () {
/* Filter on the column (the index) of this element */
oTable.fnFilter( this.value, $("thead input").index(this) );
} );
$("thead input").each( function (i) {
asInitVals[i] = this.value;
} );
$("thead input").focus( function () {
if ( this.className == "search_init" )
{
this.className = "";
this.value = "";
}
} );
$("thead input").blur( function (i) {
if ( this.value == "" )
{
this.className = "search_init";
this.value = asInitVals[$("thead input").index(this)];
}
} );
function stopTableSorting(e) { // i add this
if (!e)
var e = window.event;
e.cancelBubble = true;
if (e.stopPropagation)
e.stopPropagation();
}
...
Engine
Browser
Platform(s)
Engine version
CSS grade
[/code]