I have purchased Metronic7 and Metronic8. Currently i am using Metronic8 for my webpage. I prepared my webpage with ASP.NET Core 5.
So far everything was fine. Dropdown menus work fine . But when i reload a partial view through AJAX which also contain dropdown menus of Metronic 8, then dropdown menus not work which means click event not firing. I searched the Google that script valid only for the current elements not for the future elements (reloaded elements).
I fixed this problem in my code not in Metronic 8 with changing the code from
$(". new-page-link ").click(function(e) {
$("body").on("click",".new-page-link", function(e) {
Hi,
If you load Metronic components dynamically you will need to initialize them once they are added to the DOM. Please refer to this documentation page to initialize the core components and layout dynamically.
Regards.