There are 2 view displays (2 blocks) which are showing products, one with tile display, one with list display, as shown in the image below.
Is there a way to have both blocks on the same page, but toggle them with a button?
Once the button is clicked, one block is hidden and the other one is shown.
What would be the best way to achieve this? Is there a module that provides functionality about this?
Link to display
and can be added to header, footer, etc. in the views UI.