filter with external radio buttons and checkbox
filter with external radio buttons and checkbox

http://live.datatables.net/poragoti/1/edit?html,css,js,console,output
I have a datatables which uses 2 radio buttons and one checkbox, outside of the table, which filter the information in the table. One radio button returns all accepted and not accepted; one returns just accepted from column 1.
The checkbox returns rows that are not "i" from column 2.
Most of my code works, but what doesn't is if you click "All" and the "Exclude infraspecific names" is checked. At that point, the All button does nothing.
Will someone please help me with my code?
Thank you!!
Karen
This question has an accepted answers - jump to answer
Answers
I think the problem is you are using
pop()
to remove search plugins then pushing one or two. Without stepping through and debugging this I think you may end up with search plugins being pushed that you aren't popping but are expecting to be popped.I would create one search plugin and in the plugin get all the checkboxes and radio buttons. Then, with
if
statements decide if the row should be shown or not. This way if you want to check a row against the state of two inputs you can.Kevin
Could you please get me started? I'm not the best with jquery.
Thanks.
I have it! Thank you for the suggestion.