I have a collection list from which I display only one item at a time, and switch between items using a button. I am currently using interactions and duplicate elements such that when a button is clicked the corresponding elements for that item are set to display:block, and the elements from the previous item are set to display:none.
So, for two items in the collections, I have one set of elements with conditional visibility set to name=x and another duplicate set of elements with conditional visibility set to name=y.
It would be better if I could instead use some custom code that executes when the button is clicked that changes the conditional visibility of the elements from name=x to name=y. Thanks for any help you all can provide!