     # eventlisteners
 
     onadd: (parent, el) ->
+        el._jquery_tracker = {el}
         # insert into parent
-        delay.call parent, =>
-            if parent is parent.builder and parent._jquery.parent().length is 0
-                parent._jquery = parent._jquery.add(el._jquery)
+        that = this
+        delay.call parent, -> # !
+            el = el?._jquery_tracker?.el
+            return if not el or removed this
+            if this is @builder and @_jquery.parent().length is 0
+                @_jquery = @_jquery.add(el._jquery)
 #                 parent._jquery.data('dt-jquery', parent)
 #                 console.error "ready!", el.name, el._jquery_ready
                 el._jquery_ready?()
                 el._jquery_ready = yes
             else
-                done = => @animation.push ->
+                parent = @_jquery_tracker.el
+                done = -> that.animation.push ->
+                    parent = parent?._jquery_tracker?.el
+                    el = el?._jquery_tracker?.el
+                    return unless parent and el
                     if parent is parent.builder
                         parent._jquery.parent().append(el._jquery)
                     else

    return if removed this
    # only when tag is ready
    if @_jquery?
        do job
    else
        @_jquery_delay ?= []
        @_jquery_delay.push(job)

                    key
                else
                    # assume this is allready a jquery object
                    if (domel = key[0])?
                        attrs = {}
                        for attr in domel.attributes
                            attrs[attr.name] = attr.value
                        new @builder.Tag domel.nodeName.toLowerCase(), attrs, ->
                            @_jquery = key
                            @end()
                    else
                        old_query.call(this, type, tag, key)
#                     $(key).data('dt-jquery') or {_jquery:key}
        # register ready handler
        @template.register 'ready', (tag, next) ->
