开发者

Modifying a JQuery filter file

I've modified (visually) a nifty JQuery table filter plugin that lets you开发者_如何学Go 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$$("in­put",{type:"text",id:"filter_"+$colIdx$$inline_296$$,"class":"filter",title:$JSCo­mpiler_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).


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:   $JSCo­mpiler_StaticMethods_getFilterDom$self$$inline_295_element$$inline_303_headerText­$$
           .options.filterToolTipMessage
       } 

You are missing a ) } at the end.


Maybe you could put this in the javascript ot be execute after the DOM loads

$('.filter').hide()
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜