This is not a question regarding column layouts before someone links to one of those.
I have two boxes of text in different areas of a page that I want to be the same height. They are rendered asynchronously with jQuery. I load the data with something like this:
$.ajax({
url: someUrl,
dataType: 'html',
type: 'GET',
success: function(data) {
$(mySelector).html(data)
},
complete: function() {
adjustHeights()
}
})
adjustHeights is getting called (the reference is valid even though I clipped stuff out). The selector returns the appropriate elements too. I get the heights of all the things that match the selector and then apply the maximum height of the current ones (say one is 38px tall and one is 50px tall it returns 50px) to all of them.
The problem is that while adjustHeights works perfectly fine if I call it some time after the content is loaded (say on a button click or via debugger) when it runs here it's getting the height before everything is rendered. I suspect custom font-faces may be playing a part but I'm not sure.
Is there a good way to tell jQuery "No seriously, don't run this until everything is rendered for real.". My understanding is that this should already be happening but is not.
Edit Just verified that this problem goes away if I get rid of the font-face or the line-height that's in the CSS.