You may want to reconsider the layout of your main page in order to incorporate the necessary resources.
To achieve this, you can add <link>
tags to the current page and utilize $.getScript()
to include JavaScript and CSS files. This can be done within the callbacks of your existing $.get
function.
If you encounter challenges related to initializing plugins, functions, or event handlers that are connected to the new HTML content, you should handle these tasks within the callback of $.get()
.
Without specific details about the issues you are facing, it's difficult to provide more than general guidance.
Alternatively, consider using a more advanced dependency management script.