Suppose some piece of code changed a size of an element and called my callback:
$element.css("width", 500);
elementsWidthChanged();
For the demonstration purposes suppose there is no way the new size can be passed to the callback. So inside the callback I'm trying to get new size:
function elementsWidthChanged() {
var width = $element.outerWidth();
}
Do I always get the new dimensions? Or do I need to wait for the repaint to occur?