arrive icon indicating copy to clipboard operation
arrive copied to clipboard

The first argument to 'leave' event should be optional

Open uzairfarooq opened this issue 9 years ago • 3 comments

So, to listen for removal of .test-elem, one can simply write:

$(".test-elem").leave(function() {
    var removedElem = this;
});

instead of:

$(".container-1").leave(".test-elem", function() {
    var removedElem = this;
});

uzairfarooq avatar Sep 21 '14 08:09 uzairfarooq

A test case fails for the issue when some parent element of the target element gets removed from DOM. That's because we attach mutation event to parent element and when parent element directly gets removed the mutation event does not fire.

Any suggestion is welcome.

uzairfarooq avatar Feb 22 '15 08:02 uzairfarooq

@uzairfarooq Is there a reason why the event handler is not attached to the document element? Performance reasons?

matt-curtis avatar Oct 25 '16 22:10 matt-curtis

@matt-curtis wanted to avoid that for performance reasons but I guess it's okay to attach it to document element as I don't see any other solution.

uzairfarooq avatar Oct 26 '16 05:10 uzairfarooq