To clientHeight immediately after the display:block?

Trying to get the height of an element just after the display, but it's still zero

if( elHeight == 0){
 el.style.display = 'block';
 elHeight = el.clientHeight;
 el.style.display = ";
 console.log( elHeight); // elHeight=0
}


Google on a non-business options refers.
if you repeat the search item and again request clientHeight, then everything is OK.

PS decided not to that house applied, angular.
July 8th 19 at 11:22
1 answer
July 8th 19 at 11:24

Find more questions by tags JavaScript