Selaa lähdekoodia

Trigger event before removing element

Emmanuel Vella 12 vuotta sitten
vanhempi
commit
5cc55ebd55
1 muutettua tiedostoa jossa 2 lisäystä ja 2 poistoa
  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();
         });
     },