I would like to run some code right after a certain set of elements are attached. jQuery.live()
allows you to bind event handlers to elements, even if they are created later. But AFAIK there is no suitable method to do something like the following:
$("some selector").live("attach", function() { $(this).whatever(); });
How can I accomplish this?
EDIT: For clarification; I would like to run an animation on a newly created element. Aside from the fact animating is useless before appending first, in some browsers backgroundColor
property isn't inherited from the CSS class until it's attached to DOM. This causes my animation code to break.
So I would like to create this element, somehow apply the animation to run once it's attached and then return it.