similar to what angularUI does in order to animate an insert an element but without angular UI