Help!! I cannot get Datatables functioning
Help!! I cannot get Datatables functioning

I need to add a button that allows showing/hiding of checkeck/unchecked rows. I cannot for the life of me seem to get datatable functioning. Trying to use in conjunction with table press, wp plugin.
https://mu-del.dev.freshysites.com/product-compare/ is the page I'm working on.
https://www.custommmic.com/all-amplifiers/ is what I'm trying to recreate.
Can someone explain it to me like I'm 5? Really at a loss here.
This question has an accepted answers - jump to answer
This discussion has been closed.
Answers
Hi @FreshyMichael ,
If you look at https://www.custommmic.com/_inc/js/catfilter.js , look at the "compare function" (it says that in the comment). This is the click handler for the Compare/Reset button, it just hides the rows which aren't checked. Then, if clicked again, it resets them. Because there's no paging on the table, it all works!
Cheers,
Colin
Hi @colin ,
Thank you so much for taking the time to reply!
I found another solution that worked out VERY well @:
https://stackoverflow.com/questions/43745833/how-to-show-only-selected-rows-when-a-button-is-clicked-in-jquery
by https://stackoverflow.com/users/3549014/gyrocode-com
I like the UI with show all function, as it leaves the checked items still checked if you want to go back to the table and add more items to compare. It's also very few lines of additional code.
Just by the by, I needed to include a jquery.noConflict() as well for it to function properly in my build. I'm sure that's because I made a mistake when including a function for the plugin in the first place, causing a conflict.
Thanks again!
-Michael