Core: Fixed #3457: Removing elements causes instantiated plugins to be destroyed again.

This commit is contained in:
Scott González 2008-09-20 13:49:13 +00:00
parent d48b56a28c
commit 1df15fabb4

View File

@ -13,7 +13,10 @@
var _remove = $.fn.remove; var _remove = $.fn.remove;
$.fn.remove = function() { $.fn.remove = function() {
$("*", this).add(this).triggerHandler("remove"); // TODO: add comment about why we can't use .trigger()
$("*", this).add(this).each(function() {
$(this).triggerHandler("remove");
});
return _remove.apply(this, arguments ); return _remove.apply(this, arguments );
}; };