3 ms·
According to specs mentioned elsewhere, it seems to have reasons to exist other than just display hide/show purposes. It's easily overridden by CSS. el.style.
by talmand 13y ago
According to specs mentioned elsewhere, it seems to have reasons to exist other than just display hide/show purposes.
It's easily overridden by CSS.
el.style.display = 'none' pretty much works everywhere.
To me, it seems to depend upon what the purpose of hiding/showing the element is in specific cases.