Is it possible to use jQuery to determine the height of a range of text with a height of undefined?

I have a <span> text that is not determined by height. The text inside is inserted dynamically and varies from each instance of this gap to another. Is there a way to use jQuery to determine the height of this range?

Here is what I tried:

parseInt($('span.tag_title', container).outerHeight(true), 10)

But this does not return anything if I do not define a span in CSS?

Does anyone know how to fix this?

+4
source share
1 answer

seems to work ... you don't need to parse the value. externalHeight returns int. Here is a demo: http://jsfiddle.net/V6Gx6/show

Just resize the window.

+5
source

Source: https://habr.com/ru/post/1386888/


All Articles