Reputation: 235
I've modified (visually) a nifty JQuery table filter plugin that lets you filter text as you type - I'm sure you've all seen it done before.
My working page is here: http://www.studentbytes.co.uk/recipes.php
The original file is located here: http://www.picnet.com.au/resources/tablefilter/demo.htm
The issue I'm having is that I want to remove the input fields added at the top of each column but all my attempts to edit the original code so far have resulted in script errors. The syntax errors are on line 174 after commenting out this (which is I presume the only piece that achieves adding inputs):
{case "text":$filter$$3_header$$2_header$$inline_297_td$$1$$=$goog$dom$createDom$$("input",{type:"text",id:"filter_"+$colIdx$$inline_296$$,"class":"filter",title:$JSCompiler_StaticMethods_getFilterDom$self$$inline_295_element$$inline_303_headerText$$.options.filterToolTipMessage}
I know this means that you will have to get down and dirty in the source code but can anyone help me out?
Also, has anyone ever initiated plugins of this type and managed to implement pagination? Does the filter plugin like paginated content?
Thank you for all the help everyone. I decided that this plugin was worth providing more trouble than pleasure to stopped using it. I found a brilliant alternative at net tuts though for future reference called "Using jQuery To Manipulate and Filter Data" (I don't have the privileges to post more links yet).
Upvotes: 0
Views: 233
Reputation: 40563
The code you posted makes the brackets unbalanced. You commented out:
{
case "text":
$filter$$3_header$$2_header$$inline_297_td$$1$$ =
$goog$dom$createDom$$("input",{
type: "text",
id: "filter_" + $colIdx$$inline_296$$,
"class": "filter",
title: $JSCompiler_StaticMethods_getFilterDom$self$$inline_295_element$$inline_303_headerText$$
.options.filterToolTipMessage
}
You are missing a ) }
at the end.
Upvotes: 1
Reputation: 58611
Maybe you could put this in the javascript ot be execute after the DOM loads
$('.filter').hide()
Upvotes: 0