I am building a custom button from the ground up. This button, when clicked, should expand its height to reveal more options.
The function itself is not where I have trouble, I have already done this elsewhere successfully (adding/removing css classes). The difference is that this time there will be some number of these buttons (to be determined by data pulled from user account), so I cannot have a predetermined number of div IDs and functions to open/close the buttons.
I have anywhere from 5-10 of these same divs, and each needs to expand on click. I need to be able to pass a reference to the clicked div so that I do not have to write a separate function for each div button (considering there will be a non-determinant number of them).