At a certain stage, I am applying css to a section of my page.
Is there an event one can get once the re-layout has completed?
views:
49answers:
1
+1
A:
You can define and trigger custom events:
Binding the custom event:
$("#section").bind("layoutchange", function() {
// stuff to do when the layout changes
});
Triggering the custom event:
$("#secton").css({propertyX: otherValue }).trigger("layoutchange");
However, this custom "layoutchange" event is not related to the actual reflow being completed, but one can assume that the reflow is fast enough, so that by the time you execute the handler it has been completed.
Šime Vidas
2010-10-19 20:08:23
Thanks. I guess that will have to do.
LK
2010-10-19 20:32:00