Is there any way of changing the CSS of an element if another element is displayed as 'block' using pure JavaScript?
Sorry probably should have said, the display of the element is dependent on whether a button is pressed.
So button press, element1 = display: block; and element2 = opacity: 0.2; When element1 = display: none; element2 = opacity 1;