After updating the DOM with a new element (ei body.append (html)), I cannot immediately get the height of the recently updated element (for example, body.height ()). A partial fix sets the time interval and gets the height at the end of the time interval (setTimeout ("alert (body.height)", 500)).
Any better ideas? How to callback after fully updating DOM? Thank you
Edit: This only happens if there are a lot of events happening in the background (i.e. when the page first loads). It would seem that a page refresh is almost instantaneous if nothing is being processed. I need a callback or indicator of when the DOM is reforming!
Edit: The problem is that the browser is "distracted" from other processes, which causes the browser not to update immediately after adding an item. How to fix it?
source share