I am looking for a method with jQuery (or plain JS) in which to build a conditional on whether a div has a specific CSS characteristic.

For example, I want jQuery to add `position:fixed` to an element's CSS when another element is set to `display:none`, though change back to `position:relative` on the first element when the second element changes to `display:block`.

Any ideas?