Need assistance with dynamically changing the document object model (DOM). Looking to access and manipulate the 'text-align' and 'line-height' properties.
For instance:
<p style="line-height:1.0;text-align:justify;">
Interested in accessing all style attributes within the DOM, specifically targeting 'text-align' and 'line-height' properties to modify their values. How can I efficiently access these properties? The goal is to change 'text-align' to left and 'line-height' to 1.5 if its current value is less than 1.5.
Your help is greatly appreciated!