I recently downloaded a theme from this source. I need to specify script and CSS in the index.html file.
The body section of index.html looks like this:
<body>
<app-root></app-root>
<script type="text/javascript" src="./assets/js/main.85741bff.js"></script>
<script type="text/javascript" src="./assets/js/common.js"></script>
</body>
In common.js, I have defined my function and called it from main.85741bff.js file.
This is the function in common.js:
document.addEventListener("DOMContentLoaded", function (event) {
masonryBuild();
navbarToggleSidebar();
navActivePage();
});
However, I am facing an issue where I can call the function when the page reloads but not when the content loads dynamically.
If anyone has any suggestions on how to resolve this problem, your help would be greatly appreciated.