Hey there, I am currently working with Bootstrap and have a table that is striped. Users can filter this table by selecting different options on a form. The Javascript code I've written interprets the form input and hides rows in the table that don't meet the selected criteria.
My issue is that this filtering process disrupts the striping of the table row colors, causing adjacent gray rows to be next to one another and same for white rows.
I want to find a solution that will reapply the table striping based on the visible rows after the filtering has been done. Can anyone suggest how I might achieve this?
My aim is to avoid using .remove() on the table rows because I may need to show them again if the user changes the filter criteria. Additionally, I'm looking to steer clear of using AJAX to dynamically update the table based on filter inputs, preferring instead to stick with hiding DOM elements.
Your assistance would be greatly appreciated! Please let me know if you require further clarification :)