浏览代码

Trigger event before removing element

Emmanuel Vella 12 年之前
父节点
当前提交
5cc55ebd55
共有 1 个文件被更改,包括 2 次插入2 次删除
  1. 2 2
      Resources/public/base.js

+ 2 - 2
Resources/public/base.js

@@ -154,9 +154,9 @@ var Admin = {
         jQuery(subject).on('click', '.sonata-collection-delete', function(event) {
             Admin.stopEvent(event);
 
-            jQuery(this).closest('.sonata-collection-row').remove();
-
             jQuery(this).trigger('sonata-collection-item-deleted');
+
+            jQuery(this).closest('.sonata-collection-row').remove();
         });
     },