javascript - How to have a jquery toggle hide/show functionality that acts as multiple filtering? -
in page have 3 text act filters show/hide respective classes. all items items a items b for example, when "all items" clicked, divs have class items hidden, , strikethrough line showing on "all items" text. the same goes other 2 options. the logical error facing when 3 combining, "all items" option. for example, if "all items" clicked, , "items a", "items a" appear, strikethrough on "all items" remains. you can see code below. how can fix "logical" errors , have filtering functionality? $(".itema").click(function() { $(".itema-item").toggle(800); $(".itema").toggleclass("striketrough-line"); }); $(".itemb").click(function() { $(".itemb-item").toggle(800); $(".itemb").toggleclass("striketrough-line"); }); $(".all-items").click(function() { $(".items").t...