Skip to content

Instantly share code, notes, and snippets.

@xymox12
Created January 23, 2014 22:03
Show Gist options
  • Save xymox12/8587703 to your computer and use it in GitHub Desktop.
Save xymox12/8587703 to your computer and use it in GitHub Desktop.
Datables notes
https://code.google.com/p/jquery-datatables-column-filter/wiki/ColumnFilter
.columnFilter({
sPlaceHolder: "head:before",
aoColumns: // Uses column order rather than class :(
[
{sSelector: "#titleFilter", type: "text"},
{sSelector: "#journalFilter", type: "select"},
{sSelector: "#abstractFilter", type: "text"},
{sSelector: "#authorFilter", type: "text"},
{sSelector: "#categoryFilter",
type: "select",
bRegex: true,
bSmart: false,
values: [{'label':'Book','value':'^Book$'}]
},
{sSelector: "#yearFilter", type: "select"},
null
] ,
bUseColVis: true // Important to keep if you hide columns using aoColumnDefs
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment