With a div element in a parent div that is hidden with display:none.
- I'm dumping the jQuery
textareaelement to the console. I see that thescrollHeightproperty of the 0th element is88. - I try to read this property to a var (using
$(element)[0].scrollHeightor$(element).prop('scrollHeight')and I'm getting0.
I also tried to set the textarea to position: absolute and display: block with jQuery, before the read, with the same result.
How can I read the property correctly?
from Read scrollHeight of div with a display:none parent
No comments:
Post a Comment