Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Modifying the tablefilter jQuery plugin

I need to modify this plug-in to support not(!), (!=), (AND), (OR) operators and add some range filtering. I tried to add an elseif statement on line 412 but it doesn't work. Here is the code that I've added.

else if(/!/.test(SearchArgs[j]) && !isNaN(num_cell_data))
{
    num_cell_data != parseFloat(SearchArgs[j].replace(/!/,"")) ?
    occurence[j] = true :
    occurence[j] = false;
}
like image 794
Ryan Avatar asked Sep 14 '11 05:09

Ryan


1 Answers

num_cell_data could be integer or string, try add parseFloat to num_cell_data:

parseFloat(num_cell_data) != parseFloat(SearchArgs[j].replace(/!/,"")) ? ...
like image 152
li-on Avatar answered Oct 18 '22 07:10

li-on