<pre></pre> <pre></pre> fetch('./getData').then( resonse => resonse.json )
.then( data => {
document.querySelector('#appendMenu').innerHTML(data.menuHTML)
});
how can I make work data-menu?
// data.menuHTML
<a class="btn btn-light btn-active-light-primary btn-flex btn-center btn-sm" data-kt-menu-trigger="click" data-kt-menu-placement="bottom-end">
Actions <i class="ki-duotone ki-down fs-5 ms-1"></i>
</a>
<!--begin::Menu-->
<div class="menu menu-sub menu-sub-dropdown menu-column menu-rounded menu-gray-600 menu-state-bg-light-primary fw-semibold fs-7 w-125px py-4" data-kt-menu="true">
<!--begin::Menu item-->
<div class="menu-item px-3">
<a class="menu-link px-3">Edit</a>
</div>
<!--end::Menu item-->
</div>
<!--end::Menu-->
Hi,
Please try to call KTComponents.init()
to initialize the newly populated menu. For more info please refer to this guide.
Regards.
Thank you so much!
Hi,
Glad to help you. If you need any further help please do let us know.
Regards.