I am an amateur coder with a question that has been puzzling me for some time now. I have a feeling it should be simple, but I just can't seem to figure it out on my own. Maybe I haven't been looking in the right places... I hope you can provide some assistance.
On a page, I have a series of <div>
elements with various custom attributes. Here is an example:
<div class="face" rownumber="1" rowposition="0" playername="Jo Smith" playerrole="Captain"
playerposition="0" style="position: absolute; left: 772.632px; top: 215.934px;
width: 46.5668px; height: 46.5789px; color: rgb(255, 255, 255);
background-color: rgb(255, 0, 0);"></div>
How can I use CSS to display the "rownumber" attribute for all <div>
elements with the class 'face' initially.... and then change it to display "playername" for all elements after clicking on one button.... and finally, display "playerrole" after clicking on another button?
Thank you for taking the time to read this. I look forward to your response.