Home how to identify which span has been clicked in order to change the css property of it?
# how to identify which span has been clicked in order to change the css property of it?
 I have a set of span tags (for color blocks) and inside each, I have another span tag (for icons). I want to change the css property of an icon from display:none to display:block as soon as one of the colors is clicked. The condition being that when one of the icons has display:block then the rest should be hidden. JSFiddle to get a better idea of what I mean So here is what i mean in steps: The colors' span/block should be clicked When one of them is clicked , the icon should be displayed When another one of the colors is clicked, icon should be displayed but the previous icon that was displayed should now be hidded