Suppose I have li, for example:
<li id="1" class="show" style="display: none;">
and inside the css class I have:
.show {
display: list-item !important;
}
I wrote:
document.getElementById("1").style.display
to get the value of the display attribute.
and returns "none".
However, due to the .css class, it displayis equal list-item. How can I get the correct and applied value displayusing js?
source
share