Skip to content

Instantly share code, notes, and snippets.

@daniel-ifrim
daniel-ifrim / README.md
Created July 27, 2018 16:15 — forked from timneutkens/README.md
Magento2 | Execute data-mage-init and x-magento-init in dynamic content (ajax request)

Execute data-mage-init and x-magento-init in dynamic content (ajax response)

Trigger .trigger('contentUpdated') on the element where dynamic content is injected.

$.ajax({
    url: 'https://www.example.com',
    method: 'POST',
    data: {
 id: '1'