diff --git a/Resources/public/js/panel.js b/Resources/public/js/panel.js index 5dbd944..dfaf937 100644 --- a/Resources/public/js/panel.js +++ b/Resources/public/js/panel.js @@ -48,6 +48,10 @@ $(document).ready(function () { // Display html content $collectionHolder.append($embededItem); + // add custom javascript event on the new panel + var eventItem = new CustomEvent('ublock.after_added', { 'detail' : $embededItem }); + document.dispatchEvent(eventItem); + // Scroll to newly created block $('html, body').animate({ scrollTop: $embededItem.offset().top - 130