I am getting some html and inserting it with .html(), after which I am trying to get the width of one of newly inserted elements with .width() (which h
Depends on what browser. Occasionally I find something will break with the synchronous rendering expectations of the javascript runtime and I'll need to get the result on the next tick.
I'd try:
$(elem).html(data);
setTimeout(function(){
// Get the width here
},0);