Reputation: 1422
I have a <span>
of text that isn't defined by height. The text inside is inserted dynamically and varies from each instance of this span to the other. Is there any way to use jQuery to find the height of this span?
Here's what I've tried:
parseInt($('span.tag_title', container).outerHeight(true), 10)
But that doesn't return anything unless I define the span in CSS?
Anyone know how to fix this?
Upvotes: 4
Views: 3861
Reputation: 78550
seems to work... you don't need to parse the value though. outerHeight returns an int. Here's a demo: http://jsfiddle.net/V6Gx6/show
Just resize the window.
Upvotes: 5