0

I have page that includes 3 tabs. In one moment you can see only current tab (it is first tab, other are hidden). In second hidden tab - hidden blocks, that includes target blocks.

I can't get height of target blocks, because they are located in hidden blocks of hidden tab.

Is there a way to get the height of hidden block without showing it with JS?

Sample:

<div style=display: none> Some Content </div>

How to get height of the above div without changing display property?

fejese
  • 4,601
  • 4
  • 29
  • 36
AlexAstanin
  • 343
  • 1
  • 4
  • 14

1 Answers1

0

There's couple ways to achieve this.

  1. use opacity: 0 instead of display: none
  2. render element somewhere else, get height and use it, but this is more complex
Roman
  • 189
  • 1
  • 6